Please sign in to comment.
#send_file leans on Rack::Sendfile to X-Accel-Redirect the file's pat…
…h, so opening the file to set the response body is wasteful. Set a FileBody wrapper instead that responds to to_path and streams the file if needed.
- Loading branch information...
Showing with 21 additions and 1 deletion.