Upload content without versioning

cancel
Showing results for 
Search instead for 
Did you mean: 
ValentinLeblanc
Active Member

Upload content without versioning

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!

1 Reply
abhinavmishra14
Advanced

Re: Upload content without versioning

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:

https://hub.alfresco.com/t5/alfresco-content-services-forum/version-history-does-not-include-propert...

https://hub.alfresco.com/t5/alfresco-content-services-forum/disabling-auto-versioning-in-alfresco-li...

https://hub.alfresco.com/t5/alfresco-content-services-forum/cannot-disable-global-versioning/m-p/304...

~Abhinav
(ACSCE, AWS SAA, Azure Admin)