Open cvigano opened 9 years ago
Sorry for the delay, I just came back from my vacations.
512M is a pretty high value, I don't think many browsers can handle this today. As you said, it's probably an internal browser limit. I will try to fix this if possible but I don't think I will be able to.
I'm thinking again about this issue. Theoretically, the current browsers can upload very large files without any issues. I should create a 1GB file on my hard drive, pass it through an <input type="file">
and upload it through an XHR request, using the File
API. If everything works, then the current issue is caused by a crappy blob object and the following points could help:
Blob
constructor accepts multiple parts, currently I generate only one part (an ArrayBuffer
) and create the blob with it. What if we provide multiple parts to create the blob? I could try with 512B parts.application/octet-binary
.FormData
API?String
(urgh) or directly an ArrayBuffer
.So, uploading a 1GB file through an XHR request works. However, none of the considered solutions worked. This issue is probably related to this one on Chomium's bug tracker (I will update the README to link to this issue).
Another solution could be to create a FormData
object, append a blob (say, 200MB), and once the upload is near the end, append a new blob and close the old one. But this is probably impossible.
The last solution would be to make multiple uploads, that will be probably what I will end for, but it will surely distort the measures.
Btw, it seems like Firefox is no longer affected by this issue.
This is an error I get when using Firefox to test the upload speed. Am I hitting some internal browser limit there?
The last request made was for the size of 512M.
On Chrome and Firefox, the end event is never fired for the upload.