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

FileReader returns an empty string when the file size is to large #73

Open
mariuszste opened this issue Mar 3, 2023 · 0 comments
Open

Comments

@mariuszste
Copy link

I know this is pretty unrealistic, but I have a 600+MiB file and I get Uncaught SyntaxError: Unexpected end of JSON input because FileReader returns an empty string when the file is to big. I think one possible solution would be to read the file in chunks using File.slice.

additional links:
https://stackoverflow.com/questions/20706418/are-there-file-size-limitations-when-using-javascript-filereader-api
https://developer.mozilla.org/en-US/docs/Web/API/Blob/slice

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

1 participant