cancel
Showing results for 
Search instead for 
Did you mean: 

Edit Metadata while uploading

rassellgreen24
Champ in-the-making
Champ in-the-making
I just recently installed alfresco, and it seems to be working Perfectly for all my needs. However, the two extra functionalities that i have been trying and failing(rather miserably) to figure how to set up is How to make it so that when i select upload, i have to input the metadata, as well as how to add custom properties for documents. If anyone could help me in either of these matters i would be much obliged
1 REPLY 1

ddraper
World-Class Innovator
World-Class Innovator
This is actually a fairly tricky customization to achieve in 4.2 (and previous versions) but something we're hopefully going to be making simpler in the future. Assuming you're using a browser that supports the HTML5 file-upload capabilities you're going to be performing uploads via the "dnd-upload.js" client-side JavaScript widget (which is used for both drag-and-drop and regular file picker uploads). Are you looking to collect the metadata from the user on selected files *before* they are uploaded or to you want to offer the user the chance to set metadata after the upload has successfully completed?

If it's the latter then you're going to want to prevent the dialog from automatically closing on upload completion and get a reference to the newly created NodeRefs for the uploaded files. You're then going to need to display some kind of form (or multiple forms) for each new document and post the metadata to the forms-processor back end.

In order to prevent the dialog automatically closing and to capture the NodeRefs and display your own form you're going to need to extend the dnd-upload.js widget and instantiate your own version instead. You will be able to swap out the client-side widgets by using an extension module that targets the JavaScript controller of the "dnd-upload.get" WebScript and modifies the definitions for the widgets to instantiate (see this blog post for an example of extending and swapping out client-side widgets:http://blogs.alfresco.com/wp/developer/2012/05/22/customizing-share-javascript-widget-instantiation-...)

Hopefully this information is enough to get you on your way, please post back if any of that doesn't make sense or you get stuck,

Regards,
Dave