cancel
Showing results for 
Search instead for 
Did you mean: 

add tag to a document increase version

phil98
Champ in-the-making
Champ in-the-making
Hi,
I'm tring to devellop a web application in php with curl to acces to my localrepository
I can create document and add tags to it, but every time i add/remove a tag for document the version of document increase ?
For exemple I passed this atom string(as found in jeff potts tutorial) with curl to add a document and it work fine
<blockcode>
<?xml version="1.0" encoding="utf-8"?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/"
   xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/">
<title>apt2yum.txt</title>
<summary>essai</summary>
<content type="text/plain">= Some yum usage for people who know "apt" =

If you are familiar with the apt package manager on Debian/Ubuntu this page should help you transfer your knowledge to working with yum on Fedora/RHEL/CentOS/etc.

Note that this page as currently written is by non-apt experts, so there may be some mistakes.
…….skip
</content>
<cmisraSmiley Surprisedbject>
<cmisSmiley Tongueroperties>      
<cmisSmiley TongueropertyId propertyDefinitionId="cmisSmiley SurprisedbjectTypeId">
<cmis:value>cmis:document</cmis:value>
</cmisSmiley TongueropertyId>
</cmisSmiley Tongueroperties>
</cmisraSmiley Surprisedbject>
</entry>
</blockcode>

After that (because I don't know if I can do it in one curl command) i add some tags with the API
I use this url:
"http://x.x.x.x:8080/alfresco/s/api/node/workspace/SpacesStore/75838fb6-f461-4199-af74-41666e9d8f62/t..."
with an header json 'Content-Type: application/json'
and json data (encoded with php "json_encode")

this work fine too but after that version of document is increased to 1.1
If i tried to add or remove tag version it's increased every time.
If I do the same thing directly in share there's no change of version when you add /remove tags

Thank's a lot


2 REPLIES 2

kaynezhang
World-Class Innovator
World-Class Innovator
I'm afraid it is not possible to create document and add tags using one curl command.
As far as I know  adding or removing tag will not trigger version increasing,I gusess the versiond increasing may be triggered by your other opertions

phil98
Champ in-the-making
Champ in-the-making
Thanks for your response and sorry for not coming here for a few months
In fact, I find the solution a few times ago
I've just add in alfresco-global.properties the parameter
<blockquote>version.store.enableAutoVersioning=false</blockquote>
and he works fine there's no more increasing version when adding tag