XML Trading API - UploadSiteHostedPictures - POST upload error : Attachment request file is missing.
Hello all, and thanks in advance for your help. I'm working on a client for EPS image upload. When making a call to **UploadSiteHostedPictures** service, I always have an error message as a response : **Attachment request file is missing**. I think I follwed the correct format for this call, as described in the documentation : POST
https://api.sandbox.ebay.com/ws/api.dll HTTP/1.0 X-EBAY-API-COMPATIBILITY-LEVEL: 917 X-EBAY-API-CALL-NAME: UploadSiteHostedPictures X-EBAY-API-SITEID: 0 Content-Type: multipart/form-data X-EBAY-API-DEV-NAME: 3fdbfa3c-xxxxxxx X-EBAY-API-APP-NAME: xxxxxxxx-xxxxxxd65b1 X-EBAY-API-CERT-NAME: 4cbbd0df-xxxxxxxxx X-EBAY-API-DETAIL-LEVEL: 0 MIME-Version: 1.0 Content-Length: 33722 Connection: Keep-Alive Host:
api.sandbox.ebay.com --boundary_.oOo._MTUxOTc=OTAwMg==ODIwMQ== Content-Disposition: form-data; name="document" my_token --boundary_.oOo._MTUxOTc=OTAwMg==ODIwMQ== Content-Type: application/octet-stream Content-Disposition: attachment; name="image"; filename="image.jpg" Content-transfer-encoding: base64 /9j/4AAQSkZJRgABAQIAOwA7AAD/4QAWRXhpZgAATU0AKgAAAAgAAAAAAAD//gAeTEVBRCBUZWNobm9sb2dpZXMgSW5jLiBWMS4wMf/bAEMABQMEBAQDBQQEBAUFBQYHDAgHBwcHDwsLCQwRDxISEQ8RERMWHBcTFBoVEREYIRgaHR0fHx8TFyIkIh4kHB4fHv/AAAsIAS0BywEBIgD... **base64 encoded image** --boundary_.oOo._MTUxOTc=OTAwMg==ODIwMQ==-- All calls to other services works, I only have problem with that one, because of the image attachment format I guess. Documentation mentions : If you are using binary attachments (instead of external picture URLs), you must upload them using XML version 1.0. To include the picture as a binary MIME attachment, send it after the XML input in the same POST request. The binary attachment must be sent as a MIME attachment, in your POST request, after the XML input. I tried everything I could around this, so I would really be grateful to anyone that could explain what I'm doing wrong ... regards MK