New issue
Advanced search Search tips
Starred by 2 users
Status: Fixed
Owner: ----
Closed: Mar 2013
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug

Sign in to add a comment
FormData.append(_, File, filename) uses the File name instead of the 3rd argument's value
Project Member Reported by, Dec 10 2012 Back to list
Chrome Version       : 25.0.1349.2 (Official Build 171264) dev
URLs (if applicable) :
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 --
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' 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 "", 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

Step 6 in the FormData.append algorithm in the spec says that the 3rd argument should be used as the file name, when given.

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.
Labels: -Area-Undefined Area-WebKit WebKit-Forms OS-All WebKit-Storage-FileSystem
Labels: Mstone-23
Status: Untriaged

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

Comment 3 by, Feb 26 2013
Still happens, it works fine if you send a blob though.
Comment 4 by, Mar 2 2013
I have submitted a patch to WebKit that fixes this bug. I would appreciate any help you can spare in getting it landed.
Comment 5 by, Mar 5 2013
A patch for fixing this bug has landed into WebKit, so this bug can be closed.

Comment 6 by, Mar 5 2013
Labels: -Mstone-23 Mstone-27 WebKit-ID-111255
Status: Fixed
Thank you for the fix!

Project Member Comment 7 by, Mar 10 2013
Labels: -Area-WebKit -WebKit-Forms -WebKit-Storage-FileSystem -Mstone-27 Cr-Content Cr-Content-Forms Cr-Content-Storage-FileSystem M-27
Project Member Comment 8 by, Apr 5 2013
Labels: -Cr-Content Cr-Blink
Project Member Comment 9 by, Apr 6 2013
Labels: -Cr-Content-Forms Cr-Blink-Forms
Project Member Comment 10 by, Apr 6 2013
Labels: Cr-Blink-Storage
Project Member Comment 11 by, Apr 6 2013
Labels: -Cr-Content-Storage-FileSystem Cr-Blink-Storage-FileSystem
Sign in to add a comment