Skip to content

Commit

Permalink
Updated README to add CloudFront options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Micah Wedemeyer committed Mar 15, 2009
1 parent 48639bf commit 51c4e27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README
Expand Up @@ -47,6 +47,8 @@ has_attachment(options = {})
:partition # Whether to partiton files in directories like /0000/0001/image.jpg. Default is true. Only applicable to the :file_system backend.
:storage # Specifies the storage system to use..
# Defaults to :db_file. Options are :file_system, :db_file, and :s3.
:cloudfront # If using S3 for storage, this option allows for serving the files via Amazon CloudFront.
# Defaults to false.
:processor # Sets the image processor to use for resizing of the attached image.
# Options include ImageScience, Rmagick, and MiniMagick. Default is whatever is installed.
:uuid_primary_key # If your model's primary key is a 128-bit UUID in hexadecimal format, then set this to true.
Expand All @@ -67,6 +69,7 @@ has_attachment(options = {})
has_attachment :storage => :file_system, :path_prefix => 'public/files',
:thumbnails => { :thumb => [50, 50], :geometry => 'x50' }
has_attachment :storage => :s3
has_attachment :store => :s3, :cloudfront => true

validates_as_attachment
This method prevents files outside of the valid range (:min_size to :max_size, or the :size range) from being saved. It does not however, halt the upload of such files. They will be uploaded into memory regardless of size before validation.
Expand Down

0 comments on commit 51c4e27

Please sign in to comment.