5

I'm trying to make a webscript in Alfresco to upload a file. I'v made and all is needed to upload the selected file on form submit.

No working samples available on wiki.

Thank you in advance.

M-1
  • 51
  • 4
  • That example is not working? http://wiki.alfresco.com/wiki/Web_Scripts_Examples#Upload_Script – Florian Oct 13 '11 at 22:57
  • @Florian, it says `i.submit is not a function`. – M-1 Oct 14 '11 at 06:50
  • i.submit ? There is no i.submit in the example at all ? – toong Apr 23 '13 at 23:52
  • A complete example about how to implement an upload Web Script is available in the Alfresco Wiki: [https://wiki.alfresco.com/wiki/Web_Scripts_Examples#File_Upload](https://wiki.alfresco.com/wiki/Web_Scripts_Examples#File_Upload) – Piergiorgio Lucidi Nov 18 '14 at 16:48

1 Answers1

1

Use The below form to upload a file on alfresco repository.

<form method="post" name="uploadForm" enctype='multipart/form-data' id="upload_form" action="http://localhost:8080/alfresco/service/api/upload">
   <input type="hidden" name="destination" id="destination" value="workspace://SpacesStore/3f132339-bac1-4e0c-be03-b2ec5dbea61b" />
   <input type="hidden" name="overwrite" id="overwrite" value="false" />
   <input type="hidden" name="description" id="description" value="This is a test desc" />         
   <input class="button" type="file" name="filedata" id="filedata" />
   <br />
   <input class="button" type="submit" name="submit" value="Upload" />
</form>
Koushik Samanta
  • 195
  • 1
  • 15