1
0
Fork 0
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:
Wesley Beary 2022-03-04 07:51:11 -06:00 committed by GitHub
commit 0c3321e5fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -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.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:

View file

@ -11,6 +11,7 @@ module Fog
load(data)
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 = {})
remap_attributes(options, {
:delimiter => 'delimiter',