[Webkit-unassigned] [Bug 177647] New: FormData does not post the content of new File()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 29 04:29:06 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=177647

            Bug ID: 177647
           Summary: FormData does not post the content of new File()
           Product: WebKit
           Version: Safari 11
          Hardware: Macintosh
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: roland at nextendweb.com
                CC: cdumez at apple.com, wenson_hsieh at apple.com

The following code does not post the content of the file object to the server in Safari 10 and Safari 11. 

var fd = new FormData();
fd.append('test', new File(['hello world], "test.txt"));

jQuery.ajax({
  url: 'https://example.com',
  type: 'POST',
  data: fd,
  contentType: false,
  processData: false
});

The following works fine in Safari 10 and 11:

var fd = new FormData();
fd.append('test', new Blob(['hello world]), "test.txt");

jQuery.ajax({
  url: 'https://example.com',
  type: 'POST',
  data: fd,
  contentType: false,
  processData: false
});

I think it should work with the new File too as it works in Chrome and Firefox.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170929/1657359b/attachment.html>


More information about the webkit-unassigned mailing list