Sha256: d97500a4e65041b77a2507f9ee98158573cbb36c52867a8b79ae2f6cbb80392d

Contents?: true

Size: 564 Bytes

Versions: 1

Compression:

Stored size: 564 Bytes

Contents

cuba-sendfile
-------------

File sending for Cuba.

Usage
-----

```ruby
require "cuba"
require "cuba/send_file"

Cuba.plugin(SendFile)

Cuba.define do
  on "foo" do
    send_file("foo.pdf")
  end
end
```

For **attachments**, it's recommended to use the HTML5 [download][download] attribute.

```html
<a href="/foo" download>Download foo</a>
```

You can specify a filename too:

```html
<a href="/foo" download="bar.pdf">Download bar</a>
```

Installation
------------

```
$ gem install cuba-sendfile
```

[download]: http://davidwalsh.name/download-attribute

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cuba-sendfile-0.0.2 README.md