Petty_Crim
Petty_Crim

Reputation: 441

File Upload - Add to existing Input

I have the following file input box that allows for multiple upload:

<input name="filesToUpload[]" id="filesToUpload" type="file" multiple="" />

My users pick their files and they appear in a list. But say after picking their files a user wishes to add more files without overwriting the existing files chosen. Is it possible to add on to the list of existing files or would I need a new file input element?

Upvotes: 2

Views: 1115

Answers (1)

Ferdinand Liu
Ferdinand Liu

Reputation: 334

No, you should make new input element (perhaps by insert a new input element in onclick event handler). This is reference link from Mozilla Developer about FileList object.

Upvotes: 4

Related Questions