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

172
Vistas
HTTP 500 spring web expo image picker

I am trying to upload a file in react native using axios to a spring service backend.

  const sf5 = async () => {
    let fd = new FormData();
    fd.append("file", imgimg.uri)
    const eeefile = await instance.post('/uploadfile', {
      body: fd
    }, {headers:{
      "Content-Type": "multipart/form-data"
    }}).then(function (response) {
      //console.log('~~~~~~~~~~~~~~~' + random_val)
      //console.log(response);
    });
  }

However, spring framework is rejecting the request saying

[dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.multipart.MultipartException: Current request is not a multipart request]

I tried placing a breakpoint in the spring application class. However, request didnt even reach there.

The am able to upload the file from browser through XHR.

Any pointers would be appreciated.

about 4 years ago · Juan Pablo Isaza
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