An HTML form that allows uploading multiple files looks like this:
<form action="http://somehost.com/upload" method="post" enctype="multipart/form-data">
<input type="file" name="image" accept="image/*" multiple>
<input type="submit">
</form>
The user can click the supplied input button and select multiple files to upload.
How can the filenames be set using JavaScript?
Why would you want to do this?
To allow drag'n'drop, for instance. So that when the user drops files from their system onto the form, it can automatically populate the file input field with those files.
Is there a better way?
Possibly with some html multipart mime send function?