Multi-File Upload with HTML 5

2019-08-07 14:50发布

问题:

I have a web application that currently uses Flash. That application allows the user to select multiple files from their computer and press "upload". We then upload those files to our server. I need to update our application to use HTML 5.

My question is, what is the recommended approach for uploading multiple files with HTML 5? I am using ASP.NET MVC 3 on my backend.

Thank you!

回答1:

You want to use this in, let's say, the form that let's the user to upload files:

<input name="uploads[]" type="file" multiple="true">

Then, in the backend you can go through the uploads as an array that contain the different files.