In postman, this is easy, as I can just set the request to binary and choose the file I want to upload. However, I am not sure how to pass that binary data or how to even format it to begin with in the API Connector plugin.
I set the body type to raw, and then passed the image file encoded in base64 (using the bubble encoded in base64 file operation), using the headers:
Content-Type: image/jpeg
Accept: application/vnd.vimeo.*+json;version=3.4.
This results in a failure 400 bad request.
My question, is it even possible to send this binary data using the API connector? I’m thinking not as it is, and a quick search doesn’t show me any plugins that could allow this. So I’m thinking I have to find another way of getting that binary data through.
What would be the best way to accomplish this? This is a trivial thing that for my app is only needed for this one thing (to upload a thumbnail), so I am trying to avoid overcomplicating the process, lol.
@davidavellan I may be missing something but assuming you’re converting the image into binary data and sending that file in the Bubble API Connector you should be good?
Thanks for the tip. Unfortunately, that didn’t work. I had to choose a really small image to make it not timeout, (12kB gif), and was able to get it to output a list of numbers. I can format the list of numbers as a text, but that doesn’t work either. It’s a list of numbers from 0-255. I would guess binary data would mean a list of 0’s and 1’s, but I’m not sure how to pass that.
So I’m not sure if there is a way of formatting a string into a value that will be accepted as binary data into a raw body, or if the body type has to be set as binary (which we can’t do in the API connector).
I’m wondering if there would be a way if running a cURL request using javascript or going about this in another fashion.
If anyone stumbles across this thread, I ended up making a private plugin for @davidavellan that directly makes the API call with the binary data in a server-side action.
We found the API connector was modifying the binary data somehow before it was getting sent out.
I’m having this same issue, would be able to send me that plugin? i would reaaaally appreciate it, I’ve tried and everything and I can’t get it working.
Hello,
Same here, trying to upload a picture on Sharepoint using the Graph API, but content need to be binary data… Can you help me or give access to the plugin ?
Hello, @tylerboodman! Do you mind sending me the plugin? It would be of great help, my friend. I really need to send binary data to set up an API Call for uploading videos to Dropbox
Hi, @GH5T! Thank you so much for the plugin. I was able to make the API Call initialize and run on a workflow, but the video file im uploading to dropbox is being uploaded corrupted. Im not sure what’s happening in the conversion to binary, but I know something wrong is going on because the file size being shown on Dropbox is not equal the file size on my computer
I’m one of those guys who stumbled upon this. Do you think this will work for converting videos into binary? I’m setting up the Bunny.net API for video streaming and stuck on the binary upload. Could you please send me that plugin?