WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
37957
file API doesn't support multiple files
https://bugs.webkit.org/show_bug.cgi?id=37957
Summary
file API doesn't support multiple files
Paul Irish
Reported
2010-04-21 15:31:41 PDT
This issue with multiple files with the file API and drag and drop is described here:
http://www.thecssninja.com/javascript/gmail-upload
"Dropping multiple files will populate the files array in the file input, but selecting say 3 files and dragging them into Safari will register 3 files have been dragged but if you iterate over the files array those 3 files will all be the same file... "To explain it better let’s say you have 3 files each one called a.jpg, b.jpg and c.jpg selecting those 3 files and then clicking and dragging on the b.jpg file will add 3 files to the input. The file you did the drag operation on will be added 3 times to the input and it will ignore the other files, iterating over the files array will have b.jpg 3 times?!" This can be used as a demo page:
http://www.thecssninja.com/demo/gmail_upload/
Attachments
Add attachment
proposed patch, testcase, etc.
Robert Nyman
Comment 1
2010-10-15 02:57:16 PDT
It seems to support multiple files in the sense that it can read out the information about them (which can be seen at
http://robertnyman.com/html5/fileapi/fileapi.html
). At a first look, it rather looks like the problem is that there's no support for FileReader.
Ryan
Comment 2
2010-10-17 15:41:17 PDT
That's my demo, safari doesn't support FileReader, yet. This bug isn't to do with the File API either. Dragging multiple files onto a file input in Safari will only reference the file dragged. The count will be correct if I drag 5 files but those 5 files will be all the same.
Robert Nyman
Comment 3
2010-10-18 00:42:55 PDT
Right, but in my demo that I provided, when you drag multiple files into the file input in Safari, it doesn't seem to reference just he same file, but can read out name, size etc for each respective file that was dragged. For uploading, though, I haven't tested it.
Ryan
Comment 4
2010-10-18 15:21:58 PDT
Safari 5 on windows will not work correctly when dragging multiple files into a file input. I recorded a quick screencast showing what happens
http://screenr.com/c1D
When I drag multiple files it will get the count of the files right but the file actually dragged with the cursor will be the file to have it's information repeated nth times.
Robert Nyman
Comment 5
2010-10-19 00:50:02 PDT
Ah, I see - have only tested on Mac OS X.
Davit Barbakadze
Comment 6
2011-01-23 00:29:46 PST
Any update on this? As stated it seems to affect only Windows version of Safari, which makes whole "put-file-input-in-front-of-dragged-file-to-fake-real-drag-and-drop" trick pointless, as Safari on Mac seems to support this feature without any tricks (not sure since when though).
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug