Bug 54214 - WebKit1: When dropping multiple file in input type file with multiple attribute file list has same file multiple times instead of different files
Summary: WebKit1: When dropping multiple file in input type file with multiple attribu...
Status: RESOLVED DUPLICATE of bug 79861
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 523.x (Safari 3)
Hardware: PC Windows Server 2003
: P1 Critical
Assignee: Nobody
Keywords: InRadar, PlatformOnly
Depends on:
Reported: 2011-02-10 08:23 PST by anil
Modified: 2012-03-02 13:49 PST (History)
3 users (show)

See Also:

File shows scenario step by step (125.88 KB, image/png)
2011-02-10 08:23 PST, anil
no flags Details
test case (330 bytes, text/html)
2011-02-10 20:31 PST, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description anil 2011-02-10 08:23:06 PST
Created attachment 81984 [details]
File shows scenario step by step

As with the older versions of Safari 4.x when file control is available on the UI user have two option to select file.
1. select file open dialog box
2. by drag and drop the file on control

While investigating HTML 5 support i have found that (Safari Version No : 5.0.1(7533.17.8) ) has added input type "file" with "multiple" option. Which allows user to select the more that one file using the file dialog. Now ideally my understanding is same as earlier so user have still two option to upload the files.
1. select file(s) using open dialog
2. drag drop file(s) from desktop/explorer to the file control

Wow (1) works great but there is issue i found in second stuff. Following are the steps
1. Dragged 5 different files from desktop and dropped on file control.
2. When processed on click of form submit operation there are correct 5 files in FileList object.
3. However i found that all the files in FileFist are same instead of different, **{BUG}**

following is code snippet i have tried.

	<input type="file" multiple="true" id="files" onchange="filechanged()"/>
	function filechanged(){
		var fs = document.getElementById("files");
		for(var x=0; x< fs.files.length; x++)
Comment 1 Alexey Proskuryakov 2011-02-10 20:31:46 PST
Created attachment 82094 [details]
test case

Same test as an attachment.
Comment 2 Alexey Proskuryakov 2011-02-10 20:34:24 PST
I cannot reproduce this in Mac Safari (shipping or ToT). 

Sounds pretty horrible though.
Comment 3 Adam Roben (:aroben) 2011-02-11 06:50:21 PST
I can reproduce in WebKit1, but this seems to be fixed in WebKit2.
Comment 4 Adam Roben (:aroben) 2011-02-11 06:51:24 PST
Comment 5 Alexey Proskuryakov 2012-03-02 13:49:20 PST
Reverse duping to a bug that has a patch.

*** This bug has been marked as a duplicate of bug 79861 ***