nesk / network.js

Make accurate network measures (like Speedtest) in your browser
MIT License
297 stars 89 forks source link

Can't upload large data chunks with Chrome #31

Open cvigano opened 9 years ago

cvigano commented 9 years ago

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.

nesk commented 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.

nesk commented 8 years ago

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:

nesk commented 8 years ago

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.