Alfresco.util.Ajax.request 'multipart/form-data' ?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2014 08:18 AM
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
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
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2014 04:29 AM
I think, you can check OOTB "api/upload" webscript to send files.
Hope this helps.
Hope this helps.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2014 08:26 AM
Hi, have you found a way, how to upload file from dashlet ?
Thanks
Thanks
