Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

88
Vistas
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 Respuestas
Responde la pregunta

0

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

about 4 years ago · Juan Pablo Isaza Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda