4

Is there a way to set the Content-Type per file in a multipart upload?

All I can see is adding Content-Type at the overall request and that needs to be

Content-Type: multipart/form-data

Update with example of request:

When I insert a file (of type .CSV) into the multipart request, it does not add the content type:

POST /mywebapp/upload HTTP/1.1
Host: localhost
User-Agent: Paw/3.1.5 (Macintosh; OS X/10.13.3) NSURLConnection/1451
Content-Type: multipart/form-data; charset=utf-8; boundary=__X_PAW_BOUNDARY__

--__X_PAW_BOUNDARY__
Content-Disposition: form-data; name="file"

column1, column2

--__X_PAW_BOUNDARY__--
abh
  • 422
  • 6
  • 16
  • Thanks for the suggestion. Unfortunately, that's not yet possible in Paw. Please note that if you insert a file as a multipart value (right-click and pick File > File Content), Paw will automatically add a `Content-Type` header according to that file type. Otherwise, it's not possible to set a specific content type yet. It's our todo list. – Micha Mazaheri Feb 08 '18 at 18:18
  • I have updated the question with an example of that unfortunately not happening. – abh Feb 08 '18 at 18:29
  • That's quite strange, I've just tried it myself with a CSV file, and it seems to be working Have you been using the File dynamic value? – Micha Mazaheri Feb 09 '18 at 08:56
  • Wondering if there are any updates on this 4 years later! – Daniel Oct 20 '22 at 20:37

0 Answers0