Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Uploading big files crush page in Chrome #654

Closed
mattermoran opened this issue Dec 24, 2017 · 7 comments · Fixed by #868
Closed

Uploading big files crush page in Chrome #654

mattermoran opened this issue Dec 24, 2017 · 7 comments · Fixed by #868

Comments

@mattermoran
Copy link

So I'm doing as in this example https://github.com/ipfs/js-ipfs-api/tree/master/examples/upload-file-via-browser and everything works fine. But when I try to upload files that more than 3gb page crushes.
screen shot 2017-12-14 at 5 29 13 pm

@kostysh
Copy link

kostysh commented Mar 12, 2018

I am facing the same issue

@julientregoat
Copy link

julientregoat commented Mar 13, 2018

I have the same issue, except with files over 50-100mb crashing it. I've tried ReadableStream, pull stream, buffer instances... nothing working. Smaller files get there just fine. Running node 8.10. Thought pull streams would've worked based on this

@daviddias
Copy link
Contributor

@julientregoat -- ipfs/js-ipfs#952 -- says that things are good uploading over 1GB on js-ipfs. Here, you are using js-ipfs-api, the HTTP Client library and talking with a go-ipfs daemon, it is a different scenario.

This should just be a buffering/streaming issue when creating the HTTP request. If anyone is available to tackle this, it would be great to have it solved.

@julientregoat
Copy link

@diasdavid ah got it! sorry, I didn't understand. still new to this but will try to play with it to see if I can get anything going.

@channprj
Copy link

It works on Safari. Just crashes in Chrome. How can I handle this? Does anybody work on it?

@hacdias
Copy link
Contributor

hacdias commented Aug 29, 2018

After some discussion on IRC, @alanshaw @lidel and I found out that this happens because the library we use to shim the native Node.js http module, stream-http, stores the whole request into a Buffer and only then it sends it. That's why it uses so much memory with big files.

There seems to be an experimental Streams API for browsers, but it doesn't seem to be very supported right now.

Maybe we'll need to wait or find another way to send the files in smaller chunks.

lidel added a commit that referenced this issue Oct 4, 2018
Switching to latest version with the fix by @hugomrdias \o/
Context: jhiesey/stream-http#93
Closes #654

License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
@ghost ghost assigned lidel Oct 4, 2018
@ghost ghost added in progress and removed ready labels Oct 4, 2018
alanshaw pushed a commit that referenced this issue Oct 9, 2018
Switching to latest version with the fix by @hugomrdias \o/
Context: jhiesey/stream-http#93
Closes #654

License: MIT
Signed-off-by: Marcin Rataj <[email protected]>
@ghost ghost removed the in progress label Oct 9, 2018
@daviddias
Copy link
Contributor

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants