New issue
Advanced search Search tips

Issue 817719 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-03-19
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

HTML input type=file getting unexpected duplicate

Reported by locks...@gmail.com, Mar 1 2018

Issue description

Steps to reproduce the problem:
1. Visit web site with input type=file control (I have attached sample web page that demonstrates the behaviour)
2. Select lots of photos to upload (eg. 30)
3. Notice that there is usually a duplicate file name and many files are missing

What is the expected behavior?
That all the files selected are present in the files interface of the input type=file

What went wrong?
A duplicate file name and many files are missing from the list of files selected by the user. (See attached screenshot)

Did this work before? N/A 

Chrome version: 64.0.3282.137  Channel: n/a
OS Version: 7.0.0
Flash Version: 

This bug was apparent when testing on 3 Samsung SM-T580 tablets
 

Comment 1 by locks...@gmail.com, Mar 1 2018

Please ignore the comment about the missing filenames, that was due to breaking out of the for loop. The problem is that the files selected by the user seem to have one substituted by a duplicate of another file selected by the user.  
Components: -Blink Blink>Forms>File
Do you need to update the test content with a new one?

Comment 3 by tkent@chromium.org, Mar 2 2018

Cc: tkent@chromium.org
Status: WontFix (was: Unconfirmed)
Summary: HTML input type=file getting unexpected duplicate (was: HTML input type=file getting unexpected duplicate and missing filenames)
HTMLInputElement.prototype.files doesn't have guarantee of unique file names. File names are duplicated if multiple files were picked from multiple directories.

Comment 4 by locks...@gmail.com, Mar 2 2018

Yes I don't expect uniqueness from HTMLInputElement.prototype.files, but in my testing I am getting duplicates when I didn't select duplicates in the photo selector dialog spawned from input type=file so I added that uniqueness test in javascript to demonstrate the problem.

Comment 5 by locks...@gmail.com, Mar 2 2018

I have updated my test
mvp.html
1.1 KB View Download

Comment 6 by tkent@chromium.org, Mar 2 2018

#4,
Do you mean the size of 'files' array is greater than the number of chosen files?  Or 'files' doesn't contain some chosen files and does contain duplicates instead?

Comment 7 by locks...@gmail.com, Mar 2 2018

Hi,
I mean that if I select say 20 unique files (with unique filenames) the input type=file control gets 20 files, but one of the files is incorrectly repeated and actually has overwritten one of the other files. 

So I end up with a duplicate when querying HTMLInputElement.prototype.files and a missing file.

Comment 8 by tkent@chromium.org, Mar 5 2018

Labels: Needs-Feedback
NextAction: 2018-03-19
Status: Unconfirmed (was: WontFix)
If the file input is submitted, the contents of files with duplicated names are identical?

Can you reproduce this issue on other devices?
Can you post screencast?

The NextAction date has arrived: 2018-03-19

Comment 10 by locks...@gmail.com, Mar 21 2018

Hi,
Yes the contents of the file were identical. 

I can only reproduce this on Samsung SM-T580 tablets. But I have reproduced it on 4 different tablets of that model so far.
Project Member

Comment 11 by sheriffbot@chromium.org, Mar 21 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 12 by tkent@chromium.org, Mar 22 2018

Status: WontFix (was: Unconfirmed)
> I can only reproduce this on Samsung SM-T580 tablets. 

It sounds like a bug of Samsung's picker dialog. You should report this to Samsung.

Sign in to add a comment