0

I am trying to make a file system for my website and I this file input to hold multiple files.

I tried to put the files in a folder and put the directory on file input's value but it did not work. How can I solve this ?

(You can also comment solutions with NodeJS file system.)

<div id="input-div-2"><input id="program-input" required type="file" value="/6/"  name="file input"></div>
1

1 Answer 1

1

just add multiple attribute to your input like

 <div id="input-div-2"><input multiple id="program-input" required type="file" value="/6/"  name="file"></div>

UPDATE


based on comments you want to set multiple files onto html input element, you should do that using js

var input = document.querySelector("input");
input.files = `ArrayOfImages`;
Sign up to request clarification or add additional context in comments.

2 Comments

I am not trying to make multiple uploads .I am trying to make giving multiple files to a file input.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.