问题
Any suggestions?
Possibly something very interactive that I can multiple-select files. Thanks!
回答1:
Uploading files with Ajax isn't possible due to security reasons. There is a work-around with posting files to an iframe, but you can't select multiple files this way.
The solution lies in flash. The two most common flash uploaders are:
swfupload - http://swfupload.org/
uploadify - http://www.uploadify.com/ (jQuery only)
回答2:
plupload - http://www.plupload.com/
supports multiple uploads in every type except basic html4
Allows uploads using HTML5, gears, flash, silverlight, BrowserPlus or plain on HTML4
回答3:
Another option is Uber-Uploader I have used it and it works well with a progress bar.
回答4:
Or you could use the System.Web.UI.WebControls.FileUpload class in Asp.Net
回答5:
At this point i'd stay away from flash plugins. I'd use HTML5 uploader instead like this one:valums uploader
Sure - you'll be able to select multiple files in modern browsers only, otherwise - it'll be file by file. but hey - if person doesn't care about upgrading to newer browsers - they really probably don't know how to Ctrl+click anyways.
Flash doesn't send cookies correctly (it sends IE cookies even if you use firefox or google chrome). So - you'll lose cookies and thus sessions. There is a workaround - to send PHPSESSID in POST requests - but it simply opens door wide open for session fixation.
来源:https://stackoverflow.com/questions/1611576/best-jquery-ajax-multiple-uploader