cancel
Showing results for 
Search instead for 
Did you mean: 

pointer to adding/updating an upload document

michaelc
Champ on-the-rise
Champ on-the-rise
I was hoping someone might point me to an example of the following.

in share I want to have a upload function that will upload the document to a specified directory changing to document name to the user_id.doc with a title of username and if the document exists create a new version.
2 REPLIES 2

erikwinlof
Confirmed Champ
Confirmed Champ
Hi you can achieve this by using "folder rules". From the document library click the "Manage Rules" folder action and setup an "inbound rule" that
1. moves/copies the document to the specified folder (1)
2. and runs a "custom action" (2) OR "repo script" (3) that renames it to the format you prefer and handles the versioning.

(1) http://docs.alfresco.com/3.4/topic/com.alfresco.Enterprise_3_4_0.doc/concepts/library-folder-rules.h...
(2) http://wiki.alfresco.com/wiki/Custom_Actions
(3) http://wiki.alfresco.com/wiki/JavaScript_API_Cookbook

As you probably already know, Alfresco supports (by default) versioning for all files and the user that performed the initial upload is saved in the "createdBy" property and the user that uploads newer versions in the "modifiedBy" property.

Cheers and good luck, Erik

michaelc
Champ on-the-rise
Champ on-the-rise
Thanks Eric
gives me the info I need to move forward.