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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -