简体   繁体   中英

How to stream big files (like CSV/XML) in rails 3.1?

In Rails 3.0 it was possible to stream big files, like CSV or XML, with the self.response_body hack.

Rails 3.1 killed this feature and added streaming. Only that streaming doesn't seem to work, or there isn't documentation on how to send large files. I tried with partials, without partials, with html.erb view instead of csv.erb, and nothing works.

How can you stream large files in rails 3.1?

if you use Apache/Phusion passenger, have you tried using the rack-based x-sendfile ?

EDIT : more info here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM