My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 165095: FormData.append(_, File, filename) uses the File name instead of the 3rd argument's value
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Mar 2013


Sign in to add a comment
 
Project Member Reported by costan@gmail.com, Dec 10, 2012
Chrome Version       : 25.0.1349.2 (Official Build 171264) dev
URLs (if applicable) : http://jsbin.com/irefov/1/edit
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
  Firefox 4.x: FAIL (assuming you mean Firefox 17.x)
       IE 7/8/9: FAIL (FormData not implemented)

What steps will reproduce the problem?
1. Load the following JSbin -- http://jsbin.com/irefov/1/edit
2. Open the Developer Tools.
3. Click the 'Choose file' button in the <input type="file">, select a (preferably small text) file.
4. Click the XHR to zn-testbed.herokuapp.com' in the Network pane. Click the 'Request' tab, and look at the 'Request payload'
5. Look at the name after "filename=" in the form data.

What is the expected result?
The file name should be "file.name.from.js", as supplied in JavaScript.

What happens instead?
The file name is the name of the file selected in the <input type="file"> UI.


Please provide any additional information below. Attach a screenshot if
possible.

Step 6 in the FormData.append algorithm in the spec says that the 3rd argument should be used as the file name, when given.
http://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#dom-formdata-append

If it help with the development process, I can provide a test case that uses window.webkitRequestFileSystem to produce a File, so no user interaction is require.
Dec 10, 2012
#1 rsleevi@chromium.org
(No comment was entered for this change.)
Labels: -Area-Undefined Area-WebKit WebKit-Forms OS-All WebKit-Storage-FileSystem
Dec 14, 2012
#2 msrchan...@chromium.org
Hello,

Able to reproduce the issue.
This issue is present from M19 builds.

Thanks.
Status: Untriaged
Labels: Mstone-23
Feb 25, 2013
#3 Mayhem...@gmail.com
Still happens, it works fine if you send a blob though.
Mar 2, 2013
#4 costan@gmail.com
I have submitted a patch to WebKit that fixes this bug. I would appreciate any help you can spare in getting it landed.
https://bugs.webkit.org/show_bug.cgi?id=111255
Mar 4, 2013
#5 costan@gmail.com
A patch for fixing this bug has landed into WebKit, so this bug can be closed.
http://trac.webkit.org/changeset/144677

Mar 5, 2013
#6 tkent@chromium.org
Thank you for the fix!

Status: Fixed
Labels: -Mstone-23 Mstone-27 WebKit-ID-111255
Mar 10, 2013
#7 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Area-WebKit -WebKit-Forms -WebKit-Storage-FileSystem -Mstone-27 Cr-Content Cr-Content-Forms Cr-Content-Storage-FileSystem M-27
Apr 5, 2013
#8 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Cr-Content Cr-Blink
Apr 5, 2013
#9 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Cr-Content-Forms Cr-Blink-Forms
Apr 5, 2013
#10 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: Cr-Blink-Storage
Apr 5, 2013
#11 bugdro...@chromium.org
(No comment was entered for this change.)
Labels: -Cr-Content-Storage-FileSystem Cr-Blink-Storage-FileSystem
Sign in to add a comment

Powered by Google Project Hosting