1

I've this file input:

<input type="file" id="fileSelector" multiple="true">

If I add or remove files inside this input, it doesn't update its text.

fileSelector.files = [];

E.g, if its text is "2 files selected" and I change the files array, it doesn't update this text.

How to update this text?

1 Answers1

1

It is not possible to set the value of FileList of <input type="file"> element .files programmatically; FileList is read-only

guest271314
  • 1
  • 15
  • 104
  • 177
  • @nicematt See also http://stackoverflow.com/questions/29841147/input-file-to-array-javascript-jquery/ , http://stackoverflow.com/questions/38580177/how-to-work-with-filelist-from-input-type-file-in-javascript/ – guest271314 Aug 12 '16 at 23:30