Hi,
we upgrade our Alfresco from 5.2 to 6.1.1.
To upgrade PDF's we use the python cmis client, which work fine on new created documents in 6.1.1.
As soon we try to update a document which was created in 5.2 only the current version is updated.
Any idea how I can force to create a new major version with setContentStream?
query = "select * from cmis:document where cmis:name like '%%Drawing %s.%%' and IN_TREE('%s')" % (artnr, SITE_ID) In 6.1.1 created document: workspace://SpacesStore/0f57e9e1-8f89-41c3-a377-72db7ba62f2f;1.2 newdoc: <cmislib.model.Document object at 0x7ff7c30de390> workspace://SpacesStore/0f57e9e1-8f89-41c3-a377-72db7ba62f2f;1.3 newdoc: <cmislib.model.Document object at 0x7fd19c098390> [...] In 5.2 created document: workspace://SpacesStore/0f77acbb-cb31-4199-bc6c-07fe44a1e840;1.4 newdoc: <cmislib.model.Document object at 0x7ff7c30de610> workspace://SpacesStore/0f77acbb-cb31-4199-bc6c-07fe44a1e840;1.4 newdoc: <cmislib.model.Document object at 0x7fd19c098610> [...] f = open(path, 'rb') newdoc = result.setContentStream (f)
Same situation on copy (over existing) pdf via webdav, no new version.
Remove "cm:versionable" via webgui and re-add it and new versions are generated.
Any idea for an workaround?
If you want to create a new version of a document you must actually version the document, not just set the content stream.
Using cmislib, go look at:
and
Jeff
Hi Jeff,
thank you fo reply.
This is interessting, on new generated files (in 6.1.1) SetContenSstream works fine.
Try to modify my python script.
Checkout a document with python is no problem, but I do not know how to checkin a new document.
Do you have a example in python for me?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.