Module | Ramaze::Helper::SendFile |
In: |
lib/ramaze/helper/send_file.rb
|
The SendFile module can be used to stream a file to the user‘s computer. While the performance of the module isn‘t optimal it‘s convenient and relatively easy to use.
The send_file method streams the specified file to the user‘s browser.
@param [String] filename The name or path to the file which will be
streamed to the user.
@param [String] content_type The type of file we‘re dealing with. For
example, if we want to stream a JPG image we'd set this variable to 'image/jpg'.
@param [String] content_disposition Value for the Content-Disposition
header.