mirror of
https://github.com/fog/fog-aws.git
synced 2022-11-09 13:50:52 -05:00
Merge pull request #636 from orrin-naylor-instacart/directories_get-warning
Add warning messages around directories.get
This commit is contained in:
commit
0c3321e5fb
2 changed files with 2 additions and 0 deletions
|
@ -98,6 +98,7 @@ file = directory.files.create(key: 'user/1/Gemfile', body: File.open('Gemfile'),
|
||||||
directory = s3.directories.get('gaudi-portal-dev', prefix: 'user/1/')
|
directory = s3.directories.get('gaudi-portal-dev', prefix: 'user/1/')
|
||||||
directory.files
|
directory.files
|
||||||
```
|
```
|
||||||
|
**Warning!** `s3.directories.get` retrieves and caches meta data for the first 10,000 objects in the bucket, which can be very expensive. When possible use `s3.directories.new`.
|
||||||
|
|
||||||
#### Generating a URL for a file:
|
#### Generating a URL for a file:
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ module Fog
|
||||||
load(data)
|
load(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Warning! This retrieves and caches meta data for the first 10,000 objects in the bucket, which can be very expensive. When possible use directories.new
|
||||||
def get(key, options = {})
|
def get(key, options = {})
|
||||||
remap_attributes(options, {
|
remap_attributes(options, {
|
||||||
:delimiter => 'delimiter',
|
:delimiter => 'delimiter',
|
||||||
|
|
Loading…
Reference in a new issue