mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
Update README file
Add example to get a download url
This commit is contained in:
parent
e07f5a0d3e
commit
6d0c4c8e44
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