cancel
Showing results for 
Search instead for 
Did you mean: 

versioning files with same name

jbeardshouse
Champ in-the-making
Champ in-the-making
I have installed alfresco community edition 4.2c and I followed the wiki and documention listed below to enable autoversioning.  When I upload a file, it gets the versionable aspect, as it should.  And I can use the "upload a new version" functionality to create versions.  However, if I use the generic upload or drag and drop functionality to upload a file with the same name it will not version the file.  Instead it will create a new file with a dash and a number, like "-1". 

It is unclear to me if the "auto versioning" functionality should allow versioning of files with the same name through the generic upload functionality.  Or if it merely adds a versioning aspect to the files uploaded. 

If the auto versioning should version files with the same name, does anyone have any ideas on what it wrong?  (in this case I am not exactly sure what additionaly information may be relavent, so ask if there is something).

Otherwise, how would I go about making the alfresco share act in this way to version files with the same name?


http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fversioning....
http://wiki.alfresco.com/wiki/Versioning_Behaviour

BTW, in the metadata for this post I have set the "alfresco version number" as "other" given there is a "4.2.a" and "4.2.b" but no "4.2.c".
6 REPLIES 6

lementree
Champ on-the-rise
Champ on-the-rise
HI,

Auto Version just adds versionable aspect.

jbeardshouse
Champ in-the-making
Champ in-the-making
Thanks.

Does any one know of the best way to implement automatic versioning of files uploaded with the same name?

Even a hint in the right direction would help

jbeardshouse
Champ in-the-making
Champ in-the-making
Ok, so after looking through the code I came up with a solution.  As stated above the autoversioning stated on the wiki is not enough to automatically version files of the same name upon upload.  

The multipart mime submissions for file uploads has an "overwrite" parameter which, if set to true, will automatically version files of the same name (if the file has the versionable aspect). 

The default behavior is to have "overwrite" set to false. (I think this behaviour may have changed from a previous version of alfresco)
I could not find a global paramter to modify this parameter, so I modified the client side JS files to turn this on by default. 

I modified the "overwrite: false," to "overwrite: true," in the following files:
dnd-upload.js  dnd-upload-min.js  file-upload.js  file-upload-min.js  html-upload.js  html-upload-min.js

if there is a better way of doing this someone please let me know.

If this is the easiest way to accomplish the task.  It may be appropriate to have a feature request to expose this behavior in alfresco-global.properties, or somewhere else more excessible.  I doubt I am the only one who desired this type of behavior.

Thanks it helped alot

stefanoder
Champ in-the-making
Champ in-the-making
Thanks, I'm looking for this behavior too and you post does help.

ustamills
Champ in-the-making
Champ in-the-making
Bump.  I too would like to see this.