question

braydedeloac0 avatar image
0 Likes"
braydedeloac0 asked ·

(NodeJS) UploadSiteHostedPictures - Error 2191454 (unsupported file format) when sending binary image

I've been trying to upload a picture using UploadSiteHostedPictures for a while now, but I always get the unsupported file format error(2191454). I've tried using different images and different file types, but it doesn't change anything. The error occurs on sandbox and production. It also works fine when using ExternalPictureURL instead of a binary attachment. Any help would be appreciated.


Edit: I should also add that I tried this input on Postman and had the same error. Can anyone verify that they have been able to do a post similar to this one?


My XML is below.


headers: {

"X-EBAY-API-CALL-NAME":"UploadSiteHostedPictures",

"X-EBAY-API-SITEID":"0",

"X-EBAY-API-RESPONSE-ENCODING":"XML",

"X-EBAY-API-COMPATIBILITY-LEVEL":"967",

"X-EBAY-API-DETAIL-LEVEL":"0",

"Cache-Control": "no-cache",

"Content-Type":"multipart/form-data; boundary=----FormBoundary7MA4YWxkTrZu0gW"

}


`------FormBoundary7MA4YWxkTrZu0gW

Content-Disposition: form-data; name="XML Payload"


<?xml version="1.0" encoding="utf-8"?>

<UploadSiteHostedPicturesRequest xmlns="urn:ebay:apis:eBLBaseComponents">

<RequesterCredentials>

<ebl:eBayAuthToken xmlns:ebl="urn:ebay:apis:eBLBaseComponents">${token}</ebl:eBayAuthToken>

</RequesterCredentials>

</UploadSiteHostedPicturesRequest>


------FormBoundary7MA4YWxkTrZu0gW

Content-Disposition: form-data; name="test-pic"; filename="testpic.jpeg"

Content-Type: image/jpeg


${encodedImage}

------FormBoundary7MA4YWxkTrZu0gW--`

erroruploadsitehostedpictures
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

braydedeloac0 avatar image
0 Likes"
braydedeloac0 answered ·

I ended up just using a third party image hosting service(I used ImageKit, but there are plenty out there) so that I could upload the picture to eBay using ExternalPictureURL. As far as I can tell, eBay Picture Services just won't accept binary data for pictures.

· Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

vertika_developersupport avatar image
0 Likes"
vertika_developersupport answered ·


Hi @braydedeloac0,


Please refer below doc to upload a picture using UploadSiteHostedPictures and retry the call. If issue still persists please let us know.

REF: https://developer.ebay.com/devzone/xml/docs/reference/ebay/UploadSiteHostedPictures.html#UploadingBinaryImages


Best Regards,

eBay Developer Support

· 1 · Share
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello,


Other then removing some optional parameters, my request follows the reference exactly as far as I can tell. When I try copying the reference exactly, I have the same problem.

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.