Error on put
See original GitHub issueI’m getting the error:
Error: bad content-type header, unknown content-type: image/jpeg
“image/jpeg” is a valid mime-type, why am I getting this error?
CODE:
var formidable = require("formidable");
var form = new formidable.IncomingForm();
form.maxFieldsSize = 2 * 1024 * 1024;
form.parse(req, function (err, fields, files) {
//if (err) {
// res.writeHead(412);
// res.end();
//}
console.log(err, fields, files);
});
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
PUT/POST Errors - Afterpay Developer Docs
A common cause of this response from PUT / POST endpoints is that the request body is missing or empty. Did this page...
Read more >Web application configuration API - PUT error rules - Dynatrace
Web application configuration API - PUT error rules. Updates the configuration of error rules in the specified application.
Read more >How to fix requests.put method as it is showing status error ...
I am trying to send a http request from client to server where I am updating the page. I tried testing if my...
Read more >Getting 405 Error on Party endpoint using Postman/PUT
I'm using the iMIS demo DB. I've messed around a bunch with the web config, thinking maybe the PUT command was not being...
Read more >Getting error when updating an issue by REST API using PUT ...
Hello! I'm using Redmine REST API and I'm getting an error (500 Internal Server Error) when I'm trying to update an issue using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tobq, send it as “multipart/form-data” and it will be parsed properly. Waiting for your response to see if it was fixed or not, in order to close the issue or proceed further. Thanks.
@analytik yea, probably the problem is the way you sending it. Hm.
We are not doing anything except parsing and getting results.