HTTP Request - how to send a data-binary file?

Hi there,

is it possible to send a data-binary file with a HTTP Request? And if so, how?

Thank you and best regards

Check the component marketplace - there are two things that might be useful, one is an “upload files” function, and the other is “convert file to base64”. If the goal is your question is to upload files, then perhaps the first option does what you want. If it’s purely to encode binary for http post, then you’ll need to encode the binary first, which is what convert file to base64 will do.

Thanks for your answer, Chris,

let me be a bit more specific. I have the following CURL

curl -X POST
-H “X-Parse-Application-Id: {APPLICATION_ID}" \ -H "X-Parse-REST-API-Key: {REST_API_KEY}”
-H “Content-Type: image/jpeg”
–data-binary ‘@myPicture.jpg
https://YOUR.PARSE-SERVER.HERE/parse/files/pic.jpg

My question is how to translate that into a HTTP Request. More specifically, how do I get the data-binary into the HTTP request:

  • the response body can only be JSON or urlencoded. Is urlencoded the right choice and of so, how do I get the path received from, e.g., Pick image from library into the response body?

  • alternatively, is there a way to specify the path of the data-binary in the URL?

I am not a coder. So I don‘t know if it isn‘t possible or so obvious that no one writes about it.

Thank you and best regards,

Joerg

1 Like

Hey @Joerg_Refeld

I’m having the same problem. Did you find the solution? Please let me know if you did!

I’m also having the same issue…

Yep still no solution - I dont know whats happening here? Upload a file to a server?

Base 64 encoding shouldnt be necessary. I am happy to use ANY backend server storage at the moment that will work whether thats S3, backendless, google firebase, my own webserver etc etc

  • these two posts are the ones I have been looking at :

this is where I looked at a couple of posts where they said they solved it