API Connector using binary image format?

I’m trying to use stability.ai’s image-to-image model (docs here), but they require an image to be send in binary format.

Is there anyway to do this natively with Bubble’s api connector?

One workaround I thought of is making a Bubble plugin, then manually sending the api request using JavaScript, but not sure if there’s an easier way (or if that would even work).

Would appreciate any input or ideas.

Look around. Been discussed a bunch of times

I looked around before posting this. Read every thread I could find, including ones that you commented on lmao. Doesn’t seem as simple as your’re implying, unless I’m missing something.

If it can only be done with a plugin, then that’s the answer, but it seems unsatisfactory and wondering if there’s another workaround.

Open to any thoughts or workarounds.

As was everyone else wondering in the recent posts.

I assumed you did not see those posts (especially since you proposed making your OWN plugin).
If you saw those posts, at the very least respect people’s time (the same people you are asking to give of their time to respond to you) by referencing them and reclassifying your “Need help” as a “Question” something like this:

For 11+ years the API connector didn’t support binary format. In the last 6 weeks did 1) Bubble update the API connector to allow binary format, and 2) forget to announce it and 3) no one in the forum mentioned it even though they noticed it?
Would appreciate any input or ideas.

I have not found any plugin after searching things like “binary image plugin” and “binary image api connector”. Do you have any recommendations on what I might search to get this info?

So far the only solution I saw was a private plugin that someone else made, and presumably I’d have to make my own.

If you know the answer to the question, I’d challenge you to share it here rather than implying it’s everywhere.

Muting does not seem to work well in discourse.

Do you really require search assistance? Since binary isn’t relevant to images only why not try without “image”? and since the conversion isn’t about the api connector (it just enables you to use the file in the api connector) why not drop that from the search?
and wola by searching binary here’s the plugin that the forum posts discussed: FileToBinary by GhostCodes Plugin | Bubble

If that doesn’t work for you, I made a very basic private plugin to make an API call with binary data if you need it. It is a serverside action though so limited file sizes. The file size limit is either ~6MB or ~22 MB max, not sure :joy:

I found the API connector was modifying the binary data somehow, so using a File → Binary data converter plugin first then API Connector wasn’t working for me.

@josh Please we need a native option for sending binary data via API connector with large-ish file size :pray:


Hey I appreciate your response - if you’re able to share the plugin, I’d really appreciate it!

The above FineToBinary extension returns a binary format as a string, rather than a binary format.

I’m currently fiddling around trying to get my code right on the api request within a plugin, and seeing example code would be helpful!

I got it working for a simple get request, but still having issues submitting binary data on a post request.