Module: Ext::Sendfile
- Extended by:
- Equipment
- Defined in:
- lib/ext/sendfile.rb
Overview
The Sendfile equipment allows you to send files to the browser. See Base#sendfile for more options.
Features
- Autodetects if the
sendfileextension is used in mongrel. - Provides mime-type resolution trough the 'mime/types' library. I encourage everybody to use that lib when dealing with mime types.
Dependencies
- Equipment
- Forward
mime-typespackage. Available as a gem.sendfilepackage (optional). Available as a gem.
Example
module Controllers class ShowPasswd def get # ... sendfile('/etc/password') end end end
TODO
- Implement force_download
Defined Under Namespace
Modules: Base
Constant Summary
Constants included from Equipment
Equipment::DATA_PATH, Equipment::LIB_PATH
Instance Attribute Summary
Attributes included from Equipment
Method Summary
Methods included from Equipment
dependencies, depends_on, equip, equip_all, global_extensions, included