Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
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 answers
Answer question

0

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

about 4 years ago · Juan Pablo Isaza Report

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!