When user clicks on "Upload New Version" on a document, I need to enforce the user that the new document has the same name as the old document, otherwise don't allow the user to upload new version.
Any suggestions?
You can write behavior for same.Implement the behavior for VersionServicePolicies.OnCreateVersionPolicy (Alfresco 5.3.a-SNAPSHOT API) using this policy.You will be able to compare old name and new name in this.Throw the exception if it does not match.
If you don't want throw exception, you can update new name with the old name.
Could it be done through manipulating upload.post.js in
tomcat/webapps/alfresco/WEB-INF/classes/alfresco/extension/templates/webscripts/org/alfresco/repository/upload/
Since I don't have maven setup, I am not sure whether it can be done through classes you mentioned.
Either ways, could you please elaborate on the steps.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.