mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
Merge pull request #649 from lucasocon/patch-1
Update README file with download url example
This commit is contained in:
commit
918851cbbe
1 changed files with 14 additions and 0 deletions
14
README.md
14
README.md
|
@ -106,6 +106,20 @@ directory.files
|
|||
directory.files.new(key: 'user/1/Gemfile').url(Time.now + 60)
|
||||
```
|
||||
|
||||
##### Generate download URL
|
||||
You should pass an option arguyment that contains the `query` key with `response-content-disposition` inside indicating that is an attachment and the filename to be used when downloaded.
|
||||
|
||||
```ruby
|
||||
options = {
|
||||
query: {
|
||||
'response-content-disposition' => "attachment; filename=#{key}"
|
||||
}
|
||||
}
|
||||
|
||||
directory.files.new(key: 'user/1/Gemfile').url(Time.now + 60, options)
|
||||
```
|
||||
|
||||
|
||||
##### Controlling credential refresh time with IAM authentication
|
||||
|
||||
When using IAM authentication with
|
||||
|
|
Loading…
Reference in a new issue