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

212
Visualizações
how to get one or more files in one <input type="file" multiple />

It's confusing to me, I want to get one or more files using an input with multiple attribute.

I have created the following form:

<form method="get">
  <input type="file" name="file" multiple />
  <br /><br />
  <input type="submit" />
</form>

When I select a file and submit the form, at the end of the URL and after the question mark(?) it shows:

?file=fileName.jpg

My problem is that if the user selects two files, they must show both in the URL. Like the following:

?file=fileName.jpg&anotherFileName.jpg

I can actually have more than one file. But no matter how many files I select, it only shows one.

This is not what I'm looking for, it only shows selected photos (http://jsfiddle.net/0GiS0/Yvgc2/). But I want to submit all the files in the form, using only one <input type="file" />

about 4 years ago · Juan Pablo Isaza
3 Respostas
Responde à pergunta

0

input type="file" name="file" multiple="true"

about 4 years ago · Juan Pablo Isaza Relatório

0

<form method="get" enctype="multipart/form-data">
    <input type="file" name="file" multiple="" />
    <br /><br />
    <input type="submit" />
  </form>

enter image description here

about 4 years ago · Juan Pablo Isaza Relatório

0

<form action="/upload" enctype="multipart/form-data" method="post">
  <input type="file" name="file" multiple>
  <br /><br />
  <button>Submit</button>
</form>

Use post and multipart format to upload files

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