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

128
Visualizações
send file from FormData to backend

I used FormData to get and send form to backend.

I want to send multiple file without using multiple property of input tag (because of work purpose)

Here is my code

area += '<div id="select-file-'+ newFileIndex +  index + '">' +
    '<input type="file" name="part_kpi[' + index + '][mid_year_review_employee_file][]" id="file_' + nameInput + newFileIndex + i + '" placeholder="" onchange="showFile(this,' +  index + ',' +  newFileIndex + ',\'' +  nameInput + '\')">' +
    '<label for="file_' + nameInput + newFileIndex + i + '" class="custom-file-upload">Choose Files</label>' +
    '</div>'
$('#attachment-area' + index).html(area);

That mean whenever I upload a file, I will regenerate Choose Files button

But if I use $('#attachment-area' + index).html(area); the Form Data did not send my file to BE (if I comment out this line it sent normally)

What I should do?

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