upload Item image

Bae360Bae360 Member Posts: 10

We can successfully upload images using postman,

but we are facing errors while using our dev system.

our account is 239045

is it possible that someone from lightspeed can provide more details regarding the error.

error message without Content-Type": "multipart/form-data

   httpCode: "400",
   httpMessage: "Bad Request",
   message: "JSON Input was invalid. Error Message: Syntax error",
   errorClass: "InvalidArgumentException"

error message with Content-Type": "multipart/form-data

   httpCode: "405",
   httpMessage: "Method Not Allowed",
   message: "PUT, POST require an input body.",
   errorClass: "Exception"

payload sent

Content-Disposition: form-data; name="data"
{"description": "Test Image", "ordering": 1 }
Content-Disposition: form-data; name="image" Content-Type: image/jpeg P******RFRRlPgo


1 comment

  • Bae360Bae360 Member Posts: 10

    we have continued our searches/tests,

    the current error is

     "Invalid image type text/plain; charset=us-ascii for facebook.png",

    and this is what is sent:

    Content-Disposition: form-data; name="image"; filename="facebook.png"
    Content-Type: "image/jpeg"
    [[base64 image ]]
    Content-Disposition: form-data; name="data"
       description: "Test Image",
       ordering: 1
Sign In or Register to comment.