03-10-2022 03:56 AM
Hello,
Is there an API to upload content in an existing node without versioning it ? I think upload.post.js can only do it by versioning it, isn't it ?
Thanks for helping me!
03-10-2022 03:11 PM
So either you can do versioning or you can't. It happens at repo layer In general. Unless you have a very specific case like a custom type where you dont want to version but allow for others, then you can make use of java behaviors.
If you want to disable versioning completely, you can set this property in alfresco-global.properties and restart:
version.store.enableAutoVersioning=false
This would stop versioning any newly created content, but existing content will continue to version.
Here is littile bit information about Default behavior:
When you upload a file via share or by any means, cm:versionable aspect is applied on it. It by default sets following properties on the uploaded node:
cm:autoVersion => true - Tells that when the cm:versionable aspect is applied and initial snap shot of the node was taken.
cm:initialVersion => true - Tells that when ever a change is made to the "content of a node" that has the versionable aspect applied a new version will be created.
cm:autoVersionOnUpdateProps => false - Tells that version won't be incremented when properties are updated on a node.
This is the default configuration at repo level:
version.store.initialVersion=true
version.store.enableAutoVersioning=true
version.store.enableAutoVersionOnUpdateProps=false
You can also review these threads to find more details:
Explore our Alfresco products with the links below. Use labels to filter content by product module.