Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Update README to reflect Cloud Files.

  • Loading branch information...
commit 979ceb9afdc523003917761ed3cde2625449ace5 1 parent 9002414
H. Wade Minter authored March 24, 2009

Showing 1 changed file with 7 additions and 5 deletions. Show diff stats Hide diff stats

  1. 12  README
12  README
@@ -9,12 +9,13 @@ attachment_fu functionality
9 9
 
10 10
 attachment_fu facilitates file uploads in Ruby on Rails.  There are a few storage options for the actual file data, but the plugin always at a minimum stores metadata for each file in the database.
11 11
 
12  
-There are three storage options for files uploaded through attachment_fu:
  12
+There are four storage options for files uploaded through attachment_fu:
13 13
   File system
14 14
   Database file
15 15
   Amazon S3
  16
+  Rackspace (Mosso) Cloud Files
16 17
 
17  
-Each method of storage many options associated with it that will be covered in the following section.  Something to note, however, is that the Amazon S3 storage requires you to modify config/amazon_s3.yml and the Database file storage requires an extra table.
  18
+Each method of storage many options associated with it that will be covered in the following section.  Something to note, however, is that the Amazon S3 storage requires you to modify config/amazon_s3.yml, the Rackspace Cloud Files storage requires you to modify config/rackspace_cloudfiles.yml, and the Database file storage requires an extra table.
18 19
 
19 20
 
20 21
 attachment_fu models
@@ -42,11 +43,11 @@ has_attachment(options = {})
42 43
     :thumbnail_class  # Set which model class to use for thumbnails.
43 44
                       # This current attachment class is used by default.
44 45
     :path_prefix      # Path to store the uploaded files in.
45  
-                      # Uses public/#{table_name} by default for the filesystem, and just #{table_name} for the S3 backend.  
  46
+                      # Uses public/#{table_name} by default for the filesystem, and just #{table_name} for the S3 and Cloud Files backend.  
46 47
                       # Setting this sets the :storage to :file_system.
47 48
     :partition        # Whether to partiton files in directories like /0000/0001/image.jpg. Default is true. Only applicable to the :file_system backend.
48 49
     :storage          # Specifies the storage system to use..
49  
-                      # Defaults to :db_file.  Options are :file_system, :db_file, and :s3.
  50
+                      # Defaults to :db_file.  Options are :file_system, :db_file, :s3, and :cloud_files.
50 51
     :cloudfront       # If using S3 for storage, this option allows for serving the files via Amazon CloudFront.
51 52
                       # Defaults to false.
52 53
     :processor        # Sets the image processor to use for resizing of the attached image.
@@ -70,6 +71,7 @@ has_attachment(options = {})
70 71
                    :thumbnails => { :thumb => [50, 50], :geometry => 'x50' }
71 72
     has_attachment :storage => :s3
72 73
     has_attachment :store => :s3, :cloudfront => true
  74
+    has_attachment :storage => :cloud_files
73 75
 
74 76
 validates_as_attachment
75 77
   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.
@@ -125,7 +127,7 @@ There are two parts of the upload form that differ from typical usage.
125 127
     Example:
126 128
       <%= form.file_field :uploaded_data %>
127 129
 
128  
-Displaying uploaded images is made easy by the public_filename method of the ActiveRecord attachment objects using file system and s3 storage.
  130
+Displaying uploaded images is made easy by the public_filename method of the ActiveRecord attachment objects using file system, s3, and Cloud Files storage.
129 131
 
130 132
 public_filename(thumbnail = nil)
131 133
   Returns the public path to the file.  If a thumbnail prefix is specified it will return the public file path to the corresponding thumbnail.

0 notes on commit 979ceb9

Please sign in to comment.
Something went wrong with that request. Please try again.