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

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



Thanks

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:

    ----27f5ee5e-bb63-470d-b97e-939eaa66ae78
    Content-Disposition: form-data; name="image"; filename="facebook.png"
    Content-Type: "image/jpeg"
    [[base64 image ]]
    ----27f5ee5e-bb63-470d-b97e-939eaa66ae78 
    Content-Disposition: form-data; name="data"
    {
       description: "Test Image",
       ordering: 1
    }
    ----27f5ee5e-bb63-470d-b97e-939eaa66ae78--
    
Sign In or Register to comment.