How to select multiple files for upload :
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- Laravel Option Select - Default Issue
- How to toggle on Order in ReactJS
- PHP Recursively File Folder Scan Sorted by Modific
There is no html/javascript workaround. You would have to look to flash or java to be able to do this.
In HTML5 you can set the
multiple
attribute on<input type="file">
. This works in browsers supporting HTML5.In HTML4 your best bet is Flash or Java Applet. There are 3rd party libs available like Uploadify, SWFupload, JUpload and JumpLoader.
I would definately at this point go with new HTML5 "multiple" attribute:
The only viable alternative is FLASH plugins like swfupload.
However - there are multiple prublems with using FLASH for uploads, the main one foor me would be cookie bug:
FLASH plugins don't send cookies correctly. Each browser has it's own cookie storage.FLASH always sends cookies from IE even if you use Google Chrome for example. - result is that you loose cookies and sessions. there is a workaround - but it requires you to send session ID as GET or POST parameters which in turn makes your site vulnerable for session fixation.
As others have said, you have to use Flash to get multiple uploads. An alternative to uploadify is SWFUpload.
You could also use javascript plugins such as: http://code.google.com/p/noswfupload/