code-and-effect / effective_datatables

An effective ActiveRecord to Datatables dsl for Ruby on Rails. Make intelligent tables quickly.
MIT License
133 stars 36 forks source link

download all option triggering network failure #169

Closed nekapoor closed 2 years ago

nekapoor commented 2 years ago

Any idea why I'd get a failed network error when I try to download an entire collection?

Thank you!

matt-riemer commented 2 years ago

The CSV download is implemented as a streaming csv, so it is kind of unique.

I've had no problems with it in Chrome or Firefox tho.

All the code is in this one controller action:

https://github.com/code-and-effect/effective_datatables/blob/master/app/controllers/effective/datatables_controller.rb#L27

I based it loosely around this blog

https://dev.to/chrsgrrtt/big-csv-exports-with-rails-streaming-ftw-34o5