11 hours ago
Hi,
What I want to do is read the versions of a given document, and for each version create a new document with the content of that version. I am using a rule that starts a javascript.
The new file is created and content copied, but when I click on the newly created document I get a 'Can not load PDF content'.
Mime type seems ok. Downloading the document and opening it also gives an error that content is unreadable. What is wrong?
var originalContent = documentVersion.node.content; // get content of the version
if (originalContent)
{
copiedNode.content = originalContent; // copiedNode is a new file created earlier
copiedNode.save();
}
9 hours ago
The solution is
copiedNode.properties.content.write(documentVersion.getNode().properties.content);
Explore our Alfresco products with the links below. Use labels to filter content by product module.