Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

86
Views
Firefox and Safari setting incorrect header for ContentType when using FormData

We have a file upload code section where we use Form data to send to the file to the backend service.

let formData = new FormData();
formData.append('classFile', values.file || new Blob(), values.file ? values.file.name : '');

We make a http post request to the backend to send this data. We are noticing that the Content Type is set correctly to multipart/formdata on chrome Chrome request header whereas Firefox/Safari sets them to application/json. Firefox request header We do not pass any explicit headers on the post request. Any help on how to fix it is appreciated.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Have you tried setting explicit Content-Type: multipart/formdata header ?

about 4 years ago · Juan Pablo Isaza Report

0

We were able to resolve the issue by upgrading the version of axios package that was used for the http calls to the latest version. We can now see the content type and boundary automatically set by the browser in both firefox/safari correctly when doing a http post.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!