user6706090
user6706090

Reputation:

Update the status of a input[type=file] when change files

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?

Upvotes: 1

Views: 1331

Answers (1)

guest271314
guest271314

Reputation: 1

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

Upvotes: 1

Related Questions