Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browser crashes saving a large file #48

Open
thiagocarvalhodev opened this issue Aug 12, 2022 · 4 comments
Open

Browser crashes saving a large file #48

thiagocarvalhodev opened this issue Aug 12, 2022 · 4 comments

Comments

@thiagocarvalhodev
Copy link

thiagocarvalhodev commented Aug 12, 2022

I'm using this package to save a file on the default directory on Web. For small files, it works really well, but for large files (above 100Mb) it just crashes the Browser.

As it freezes and crashes, I can't provide a detailed log.

Tested:

  • save a 1Mb file ✅
  • save 10Mb ✅
  • save 50Mb ✅
  • save 80Mb ✅

After 100Mb, it begins to crash.

You can test trying to save a Uint8List of 100Mb

await FileSaver.instance.saveFile('file_name.txt', Uint8List(104857600), 'text/plain');

Using the version 0.1.1

@mminhlequang
Copy link

@thiagocarvalhodev you can use this
https://github.com/eligrey/FileSaver.js/blob/master/src/FileSaver.js

also @incrediblezayed you can improve for web platform with this

@incrediblezayed
Copy link
Owner

@thiagocarvalhodev you can use this
https://github.com/eligrey/FileSaver.js/blob/master/src/FileSaver.js

also @incrediblezayed you can improve for web platform with this

I've been trying to integrate for a while now, I already removed method channel from web and I've added conditional imports, but currently I'm trying to integrate the js FileSaver for a while with whatever time I'm getting out of my other work, I hope I'll be able to do it this month.
And thank you

@incrediblezayed
Copy link
Owner

Actually this limitation is from flutter itself actually, flutter doesn't allows blob size greater than 100 MB

@schmitzli
Copy link

Hello,

currently in our environment web (chrome / edge, flutter: 3.19.3, filesaver 2.3.13)
we are able to save files up to about 320 MB, but 420 MB simply fails.
This issue does not exist on Firefox with the same build.

The 100 MB limit does not seem to exist anymore, but what is it now?

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

No branches or pull requests

4 participants