AnsweredAssumed Answered

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

Question asked by yascorp on May 15, 2014
Latest reply on Aug 19, 2014 by .jan
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

Outcomes