Open jq6l43d1 opened 2 months ago
yeah I checked the code and it is creating a base64 url which is probably hitting the limit supported by firefox. Seems like rx.download implementation can be improved. Do you know what would be the correct way to support large files to be downloaded? I also tried creating an API route and returned FastAPI Response with random bytes (30mb+).. that seemed to work from CLI (using backend url) but not via the download button (added a redirect to backend api url)..
I found relevant documentation here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs#length_limitations
It looks like the limit for Firefox is 30 MB. This doesn't seem to be an issue with Reflex. Although maybe we could a size limit info to the docs.
Yes, correct but shouldn't reflex support large file downloads? FastAPI works correctly for such large files. I was wondering if rx.download implementation could be improved like rather than creating a url for bytes data why not send stream of data. Is there any such guide or protocol to follow to correctly implement the download feature?
Describe the bug When using rx.download with data= and bytes data that is 30MB or larger the download never happens. It does work in Chrome. When I set the data size to 20MB the download works in Firefox.
To Reproduce
Expected behavior The download should work as it does in Chrome, or as it does in Firefox when the data is 20MB or less.
Specifics (please complete the following information):
Additional context I can see the data downloading when I look at my system monitor but Firefox never actually saves the file or gives any kind of prompt.