Posted by philbar on November 7, 2009 at 5:05am
Jump to:
| Project: | Drupal core |
| Version: | 8.x-dev |
| Component: | file.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
| Issue tags: | attach files, html5 |
Issue Summary
HTML5 introduces a few new attributes to forms to improve file upload usability. The first is the "Multiple" attribute:
http://dev.w3.org/html5/spec/forms.html#attr-input-multiple
It is already supported by Safari 4 and Chrome 3. It will be supported in Firefox 3.6.
It's easy to use. Simply use the attribute as follows:
<input type="file" multiple>
Comments
#1
Thanks for informing me of this change, I wasn't aware of multi-file uploads in HTML5. Unfortunately this will certainly require extensive changes on the processing side as well, especially taking into consideration things like limiting the number of uploads to a certain number or getting the progress bar working with multiple files being uploaded at once. I doubt that the PECL uploadprogress extension properly supports multiple uploads yet.
Considering that nearly all of FileField has been moved into Drupal 7, and we're past code-freeze for new features/APIs in Drupal 7, I doubt this feature will ever be added to FileField in an official release. It might be helpful to develop this functionality as a experiment to see what is necessary for its implementation, but unfortunately we probably won't see this officially released in FileField, since this module will be discontinued in Drupal 7 anyway.
#2
Moving over to the Drupal 8 core queue. I found this issue when looking to see if something like http://www.uploadify.com was available for File field. Using HTML 5 seems like a much better solution (core worthy). Browser support is more solid than I would have imagined.
#3
This is a pretty popular feature request. Marked the following as duplicates while cleaning up the upload module issue queue:
#101972: Select multiple files before upload
#452446: Select multiple files to upload
#4
I would love to see this happen / Subscribe.
#5
subscribe
#6
Subscribing.
I'm looking into possibilities of how to handle multiple uploads for Drag'n'Drop Uploads and this would probably be the best case scenario. If I get impatient/more time I might even have a whack at it myself, though I couldn't expect this to be a simple task.
#7
google implemented this in gmail; file attachments now support multiple file uploads with upload progress. I dont know if this would be to difficult to implement as it seems that it only uploads one file at a time, so it should be able to be detected.
There is also a jquery plugin for HTML5 Upload located
http://plugins.jquery.com/project/jquery-html5-upload
There are also some more HTML5 related jquery plugins like a drag drop area for file uploads
http://plugins.jquery.com/taxonomy/term/2813
#8
Is there a reason this needs to wait until D8?
It seems like all that is needed is changing:
<input type="file">to
<input type="file" multiple>#9
You also have to handle the files on the server side. See comment #1.
#10
Yes, there is a lot more involved than the change in #8.
#11
Check out this video example... http://hacks.mozilla.org/2010/02/an-html5-offline-image-editor-and-uploa...
Absolutely mindblowing. :) Or this one... http://hacks.mozilla.org/2009/12/uploading-files-with-xmlhttprequest/
#12
@portait,
Just a tip, probably best not to use short URLs when you don't need to, I nearly reported you as a spammer, but I decided to use a service to determine the real destination of the short URLs in case they where legitimate, which they where.
I would suggest changing the URLs to the real URLs so no one else jumps to the same conclusion I initially did.
And for a third video, check out what you can already do with the Drag'n'Drop Uploads module: www.youtube.com/watch?v=ws6rynGxU0I
Cheers,
Deciphered.
#13
Today I happened across two implementations of drag and drop, in Gmail and Campfire respectively. Relevant URLs below.
Gmail:
http://ajaxian.com/archives/drag-and-drop-file-uploads-in-gmail-using-just-the-specs?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+ajaxian+(Ajaxian+Blog)&utm_content=Google+Reader
Campfire:
http://productblog.37signals.com/products/2010/04/new-in-campfire-drag-a...
I'd expect drag and drop to becoming more mainstream as time goes on. To support this would core have to set its doctype to HTML5? What are the other dependencies? (I really need to get up to speed with HTML5).
#14
+1
#15
tagging
#16
~
#17
Maybe related:
- http://the-stickman.com/web-development/javascript/upload-multiple-files...
- http://www.fyneworks.com/jquery/multiple-file-upload/
- http://aquantum-demo.appspot.com/file-upload
- http://valums.com/ajax-upload/
- http://drupal.org/project/uploadify
#18
+1
#19
So the module Uploadify does support attaching multiple files to CCK (yes, files, not just images.)
http://drupal.org/project/uploadify
It's not extremely active and still has issues, but it works, at least for 6.x.
So if the issue here is "Support Uploading Multiple Files for HTML5 Browsers" this could be marked fixed for 6.x, but if the issue is to do it an HTML5 way, we should re-title: "Support HTML5 multiple file upload method"
#20
+1 for feature request.
Look module "Multiupload Filefield Widget" http://drupal.org/project/1115362
#21
I plan to release a small module to fill this gap in Drupal 7 (already dug into the source code of file/image fields and this seems achievable, in its most primitive form, with no core-patching needed in <16h of coding/testing).
Project URL: http://drupal.org/sandbox/z7/1348240
Any comments are welcome. If there are people planning to do the same thing, please let me know.
#22
#21 HEAD is missing, cannot checkout.
#23
Anyone willing to work on this? Would be nice to have it for Drupal 8.
#24
#22 Use branch 7.x-1.x (instead of trunk).
Source code is also available at https://github.com/z7/Drupal-module-html5_upload