I’m having some issues with file upload using the Web Client DAT. I’m using the
request(url, method, uploadFile) method in Python with a PUT request method.
When trying to digest the request with Express.js / Formidable, it gives an error:
Error: bad content-type header, no content-type
Since I believe the
Content-Type should be
multipart/form-data for file upload, I can pass that manualy in the headers for the request method. However then I get the following error from Formidable:
Error: bad content-type header, no multipart boundary
I believe the boundary should be set by the web client when making the request and match with a value in (or size of?) the request body, which is the file contents.
When using POST for example, I do see that the Web Client DAT sets the
application/x-www-form-urlencoded. However that doesn’t work with file upload.
Could the missing header with PUT be an error in the client, or am I missing something?