UploadSiteHostedPictures issue with binary image
Hi everyone,
I use UploadSiteHostedPictures API to upload images to eBay serve.
I have a problem when Uploading Binary Images.
I also read the document carefully. But I have "XML Error Text: "{0}"." I do not know "include the picture as a binary MIME attachment after the XML input in the same POST request" as the documentation instructs.
If you have a solution, please give it to me.
Thanks.
1 comment
five_notch_trading_post
·3 years ago · EditedThis python code works:
But it depends on the specifics of what you are using to build the request.. It is likely a header issue.
For example in the above, you leave out "Content-Type": "multipart/form-data" from the headers dict because python requests will handle that part along with setting the boundary - if I add Content-Type to the headers dict myself, it breaks it and causes python requests to not handle it correctly and i get a "XML Error Text: "{0}" response... So whatever the specifics of what you are using, it is likely doing something similar that you have to figure out what it requires.