ankane / blazer

Business intelligence made simple
MIT License
4.5k stars 471 forks source link

Changes download to not write file before sending response #474

Open ronualdo opened 3 months ago

ronualdo commented 3 months ago

I have a few cases where the download action is triggering server timeouts because it seems that Blazer is writing the whole CSV to the disk before sending the response. I was wondering if we could use response.stream instead to avoid this type of scenario.

I've opened this PR with an initial implementation. Would love to hear any thoughts on this.

ankane commented 3 months ago

Hi @ronualdo, thanks for the suggestion and PR! I think we can switch to send_stream once Rails 6.1 is no longer supported (branch).