I would have thought this would be super easy to find an answer to on the interwebs but apparently not.
On an HTML page, I wish to allow a user to select multiple files and upload them to my server. Specific context is that the user needs to choose a resume file and a cover page to apply for a job.
Important considerations:
- I'm not interested in an HTML5 or flash or tricky solution - just the basic question, is it possible with plain old HTML in a plain old browser.
- I am okay with having multiple upload fields and multiple buttons to choose each file.
- A single submit button needs to submit them both.
- Needs to support IE6.
Is this possible? It seems very hard to find a straight answer.
For example would something like this work? (I grabbed it from somewhere on the net sorry if I have not credited the source)
<form action="/py/uploadfile" method="post" enctype="multipart/form-data" name="form1" id="form1">
<label>upload file<input type="file" name="file[]" id="file1" /></label>
<label>upload file<input type="file" name="file[]" id="file2" /></label>
<label>upload file<input type="file" name="file[]" id="file3" /></label>
<label><input type="submit" name="button" id="button" value="Submit" /></label>
</form>
thanks