post - How to encode file contents for Parse.Cloud.httpRequest() -
i have file in parse cloud data store.
i want post file along text data 3rd-party web server accepts html forms via post. i'm getting filecontents using this:
cvfileptr = parseobj.get("file"); parse.cloud.httprequest({url:cvfileptr.url()})
how use httprequest post file? or more specifically, how encode filecontents?
parse.cloud.httprequest({ method:'post', 'content-type':'multipart/form-data', url:'http://...', body:{ 'field':'some text', 'file':magic(filecontents) } }
is there function replace magic in code snippet?
parse cloud code doesn't support multipart/form-data
. can check here
Comments
Post a Comment