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?
It looks like the “Content-Type” header in the request is missing the “boundary” element. Here’s what it should look like:
Where “-----WebKitFormBoundaryXXXXXXXXXX” is from the payload identifying the part with the file data.
Thanks so much. Now it works as it should. Angular 2 Http service doesn’t append boundary and I didn’t notice that.