Bug 175533
Summary: | Upload of large files (~100 MB) fails on Safari with Fetch/XHR | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ebrahim Byagowi <ebrahim> |
Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | achristensen, ap, beidson, darin, dbates, webkit-bug-importer, youennf |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 10 | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Ebrahim Byagowi
Safari 10.1.2
Steps to repro:
0. Install a recent version of node.js, perhaps from brew by `brew install nodejs` (needed for the simple server setup)
1. Save content of below script to server.js:
"""
require('http').createServer((req, res) => {
if (req.method === 'POST')
return req
.on('data', () => undefined)
.on('end', () => { res.end(req.url + ' uploaded!'); console.log(req.url + ' uploaded!'); })
.on('close', () => console.log(req.url + ' connection has closed.'));
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(`<input type="file" onchange="
var formData = new FormData();
formData.append('blob', this.files[0], 'file');
fetch(this.files[0].name, { method: 'POST', body: formData }).then(x => x.text()).then(alert, alert);
">`);
}).listen(4040, '127.0.0.1', () => console.log('Listening on http://127.0.0.1:4040/'));
"""
2. Open http://127.0.0.1:4040/ and upload some small files first, then try to do the same with bigger files like 100mb or more, multiple times.
Expected:
Getting "uploaded" alert very consistently each time, like Chrome and Firefox.
Actual:
It works very inconsistently on Safari and gets timeout.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/33878674>
Ebrahim Byagowi
Can you reproduce this issue there? Despite using an official build seemingly (Version 10.1.2 (12603.3.8)), it seems my Safari suffers from lots of thing as my console.log('text') also doesn't put anything on the console!!1
youenn fablet
I tried with Safari 11 and STP and was able to upload files from 50MB to 8Go.
Can you try with Safari Tech Preview?
Ebrahim Byagowi
I can not check it with Safari TP as just its recent version stoped to work here, I guess that has something to do with the oldness of my MacBook Air.
Ebrahim Byagowi
I don't see the issue any longer. Perhaps is fixed somewhere else. Thanks!
Alexey Proskuryakov
Thank you for the follow-up!