Unable to upload file

Hi!
I am trying to upload jpg file via rest api. My request seems to be correct, however I always get error message “Unable to upload a file”. Below I attach screenshot of my request. What is wrong?

Hi Tomasz,

It looks like the “Content-Type” header in the request is missing the “boundary” element. Here’s what it should look like:

Content-Type:multipart/form-data; boundary=-----WebKitFormBoundaryXXXXXXXXXX

Where “-----WebKitFormBoundaryXXXXXXXXXX” is from the payload identifying the part with the file data.

Regards,
Mark

Thanks so much. Now it works as it should. Angular 2 Http service doesn’t append boundary and I didn’t notice that.