cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco.util.Ajax.request 'multipart/form-data' ?

yascorp
Champ in-the-making
Champ in-the-making
Hello,
I made a dashlet with title, description, category & file inputs.(Share webscripts)
I have a javascript function called on the click of submit button.
This function have an "Alfresco.util.Ajax.request" to send the inputs data values to the "xxx.post.json.js" (Alfresco webscripts).

How can I define "requestContentType" to send "multipart/form-data" ?

Is there a FormData object to be define ???

I'm trying to do it this way because I made It first to send JSON data even for file type and when I have done :

newFile.content = filecontent

filecontent contain base64 encode and I can't read my image !

So I think for sending Files(images) multipart/form-data is more interresting than the JSON one.

Please Help me to find a solution
Thnx & Regards
2 REPLIES 2

aaditvmajmudar
Confirmed Champ
Confirmed Champ
I think, you can check OOTB "api/upload" webscript to send files.

Hope this helps.

_jan
Champ on-the-rise
Champ on-the-rise
Hi, have you found a way, how to upload file from dashlet ?

Thanks
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.