Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am running rails 3.0.10 and spree 0.60 and was able to get spree to use s3 storage over writing to the public folder of the app by doing the following The process should be alike.</p> <p>add aws-s3 gem to your Gemfile</p> <pre><code>gem 'aws-s3' </code></pre> <p>bundle installed and after doing that I created a yaml file in the config directory called s3.yml and it should look something like this.</p> <pre><code>development: &amp;DEFAULTS bucket: "YOUR_BUCKET" access_key_id: "YOUR_ACCESS_KEY" secret_access_key: "YOUR_ACCESS_SECRET" test: &lt;&lt;: *DEFAULTS bucket: "YOUR_BUCKET" production: &lt;&lt;: *DEFAULTS bucket: "YOUR_BUCKET" </code></pre> <p>You can specify individual credentials per environment if you like but since mine are all using the same S3 accont I opted to set defaults.</p> <p>after that you are going to have to override the image model or make a decorator for your which tells paperclip to use S3 and to have it parse the yaml file created for credentials.</p> <p>the area you want want to override would be this</p> <pre><code>has_attached_file :attachment, :styles =&gt; {:mini =&gt; '48x48&gt;', :small =&gt; '200x100&gt;', :product =&gt; '240x240&gt;', :large =&gt; '600x600&gt;'}, :default_style =&gt; :small, :storage =&gt; :s3, :s3_credentials =&gt; "#{RAILS_ROOT}/config/s3.yml", :url =&gt; "/assets/products/:id/:style/:basename.:extension", :path =&gt; ":rails_root/public/assets/products/:id/:style/:basename.:extension" </code></pre> <p>you can change these properties as needed but whats important is that you specify :storage and :s3_credentials.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload