jimmywarting / StreamSaver.js

StreamSaver writes stream to the filesystem directly asynchronous
https://jimmywarting.github.io/StreamSaver.js/example.html
MIT License
4.04k stars 418 forks source link

download crashed after 2GB #112

Closed bhargav19 closed 5 years ago

bhargav19 commented 5 years ago

Im trying to download a large file of 5gb file through StreamSaver.js but it crashes after reaching 2 GB. Please help me out on this.

here is part of code snippet i am using

const streamSaver = require('streamsaver');

// using streamSaver 
const fileStream = streamSaver.createWriteStream(fileName);
const readableStream = res.body  // res is response from the fetch api

    if(window){
      // more optimized
      if (window.WritableStream && readableStream.pipeTo) {
        return readableStream.pipeTo(fileStream)
      }

      window.writer = fileStream.getWriter()      
    }
jimmywarting commented 5 years ago

What browser are you using?

bhargav19 commented 5 years ago

Chrome

jimmywarting commented 5 years ago

hmm, tried Chrome v76 had no problem saving 3.15 gb of lorem data using this demo https://jimmywarting.github.io/StreamSaver.js/examples/plain-text.html

might have more Ram

jimmywarting commented 5 years ago

Are you using a secure origin?

Dose it work to save 2gb+ with this demo? https://jimmywarting.github.io/StreamSaver.js/examples/plain-text.html