Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

cannot select multiple files when uploading

I am making an app using HTML CSS and JS by watching a tutorial, the app will merge multiple pdfs but I can’t select multiple files I even tried to can the type (when selecting files) to all but it doesn’t work

My Code:

<div class="container">
    <h1>PDF MERGER TOOL</h1>
    <form method="post" action="/merge" enctype='multipart/form-data'>
        <div class="form-group">
          <label for="exampleFormControlFile1">Select the PDF files you want to merge</label>
          <input type="file" class="form-control-file" name="pdfs" id="exampleFormControlFile1" accept=".PDF">
          <input type="submit" value="Submit" class="btn btn-primary my-4">
        </div>
      </form>
</div>

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You need to add the multiple attribute to enable multiple files selection.

<input type="file" class="form-control-file" name="pdfs" id="exampleFormControlFile1" accept=".PDF" multiple>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading