AnsweredAssumed Answered

Upload form customization

Question asked by tytanix on Nov 5, 2013
Latest reply on Nov 6, 2013 by arnoldschrijver
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: "tr:offer",
      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.

Outcomes