mik01aj
mik01aj

Reputation: 12382

What is the maximum file size that I can get as Data URL from an input field?

I'd like to use FileReader.readAsDataURL().

Is there any (practical) limit on the file size? How is this limit browser-dependent?

Upvotes: 0

Views: 1237

Answers (2)

Rob Foley
Rob Foley

Reputation: 581

Keep in mind that, with FileReader, if you are reading it all at once, it will read the entire file into memory at once. In that case, the users' memory would be a limiting factor, and their browser would very likely slow to a crawl when handling a large file.

Upvotes: 1

Brainhash
Brainhash

Reputation: 141

You might want to check this answer: Are there file size limits on FileReader

More than the actual limit, you should consider your users device capacity,browser and how this impacts his/her experience.

How is this limit browser-dependent? Since browser is mediating the file transfer, each browser may incur its own limitations of handling large sizes.

Upvotes: 1

Related Questions