Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

174
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda