cancel
Showing results for 
Search instead for 
Did you mean: 

Upload form customization

tytanix
Champ in-the-making
Champ in-the-making
Hello everyone!
Is there someone who knows how to customize the upload form to allow the user to select the content type for the document before upload it?

I've tried modifying flash-upload.get.js in
  /opt/alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/upload

adding in model.contentTypes= my custom model like this

<blockcode>
/**
* Custom content types
*/
function getContentTypes()
{
   // TODO: Data webscript call to return list of available types
   var contentTypes = [
   {
      id: "cm:content",
      value: "cm_content"
   },
   {
      id: "trSmiley Surprisedffer",
      value: "tr_offer"
   }];

   return contentTypes;
}

model.contentTypes = getContentTypes();

function main()
{
   // Widget instantiation metadata…
   var flashUpload = {
      id : "FlashUpload",
      name : "Alfresco.FlashUpload"
   };
   model.widgets = [flashUpload];
}

main();

</blockcode>

but when i upload a file the dropdown button to chose the type continue to not be shown.
4 REPLIES 4

arnoldschrijve1
Champ on-the-rise
Champ on-the-rise
Hi,

You could take a look at this blog post from Ixxus from some time ago: http://www.ixxus.co.uk/blog/2011/09/customising-upload-files-dialog-alfresco-share

BTW a more concise article can be found here: http://tribloom.com/blogs/michael/2011/05/03/share-dynamic-forms

tytanix
Champ in-the-making
Champ in-the-making
Thank you for suggestions but i've already seen and followed those article but it still doesn't work.

sanket
Champ on-the-rise
Champ on-the-rise