Forum Academy Marketplace Showcase Pricing Features

Issue with api upload image call

hey , i’m beginner in API and i try to connect my app with local online store provider like Shopify , i face issue when i try to POST request to upload product image,
this image show my setup ;

and here when i try to initialize call i got this erorr ;

this is from provider Doc ;

full api doc if you want to take a look , can’t figure out what’s wrong with this !!

1 Like

will a browser render the photo at - test this by supplying the full product url in a browser… if u do NOT get a photo , read on …

wild guess…

the post URL ( is being used to fetch a photo as binary ( not as bin64 string )

the photo stream supplier ( bubble db responding to a fetch ) surves up the WRONG byte format ( string when the consumer actually wants bytes or native jpg/png )

test it out by making a 2nd call using a generic web image that you know returns native img bytes. this can be whatever from a right-clik on any photo and hopefully you will not get a CORS err fetching the 3rd party content.

1 Like

i’m sorry bro , i don’t understand this, my bad
can you tell me about steps to test this solution, I’ll be thankful to you

you may b using the wrong link in the dropDown for embed codes on ??

for example, on upload of random photo to imgbb domain, your given a list of ways ( embed links ) to request the photo selection from list → encoding of the response

AND perhaps you supply the incorrect choice when you try to init the bubble api connector

So , just try the other links each time retrying the connector.init action … one of them should result in a good init.

its kinda like what i did below , in order to determin if the browser would render the links…

NOTE your error code on the init is saying it does not like the byte format it was given in the body ( photo field of the connector form )

** HTML full linked** is the drop down selection value that i used above to get the browser to render the tag…

1 Like

thank you bro for your time to help me, i think I found the solution

this post was helpful