- 06 Oct, 2010 1 commit
-
-
Jon Yurek committed
-
- 01 Oct, 2010 1 commit
-
-
This method prevents excessive calls to the S3 API, creating a bucket only if the store method fails with a NoSuchBucket error instead of asking for the bucket before each request.
Jon Yurek committed
-
- 19 Aug, 2010 1 commit
-
-
Jon Yurek committed
-
- 18 Aug, 2010 1 commit
-
-
Jon Yurek committed
-
- 17 Aug, 2010 2 commits
-
-
Fiona Foo & Nate Clark committed
-
Jon Yurek committed
-
- 16 Aug, 2010 2 commits
-
-
Leverage browser caching and proxy caching by setting far future Expires headers and changing filenames when file contents change. This can make your web app faster for users and also reduce your bandwidth costs. By adding the column :avatar_fingerprint to our db table and including :fingerprint in the attachment filename, we ensure the filename will change whenever the file contents do. has_attached_file :avatar, :styles => { :medium => "300x300>", :thumb => "100x100>" }, :path => "users/:id/:attachment/:fingerprint-:style.:extension", :storage => :s3, :s3_headers => {'Expires' => 1.year.from_now.httpdate}, :s3_credentials => "#{RAILS_ROOT}/config/s3.yml", :include_updated_timestamp => false This enables us to set far future expire headers so that browsers don't need to check for a newer version. If a change does occur, say because a user uploads a new avatar, the new filename will be rendered in your html and the cached version will be ignored. The example above will set Expires headers in S3. If you're using local storage you can configure your webserver to do something similar. We disable the timestamped query string because some proxies refuse to cache items with query strings. For more info on optimizing for caching: http://code.google.com/speed/page-speed/docs/caching.html
Mike Bailey committed -
Jon Yurek committed
-
- 10 Aug, 2010 1 commit
-
-
Jon Yurek committed
-
- 06 Aug, 2010 1 commit
-
-
Jon Yurek committed
-
- 01 Aug, 2010 1 commit
-
-
Jon Yurek committed
-
- 28 Jul, 2010 1 commit
-
-
Jon Yurek committed
-
- 11 Jul, 2010 2 commits
- 01 Jul, 2010 1 commit
-
-
Jake Paul committed
-
- 18 Jun, 2010 1 commit
-
-
Jon Yurek committed
-
- 09 Jun, 2010 1 commit
-
-
Jon Yurek committed
-
- 07 Jun, 2010 5 commits
-
-
Joshua Clayton committed
-
Joshua Clayton committed
-
Joshua Clayton committed
-
Jon Yurek committed
-
Based on a commit by Henrik N <henrik@nyh.se>
Jon Yurek committed
-
- 01 May, 2010 3 commits
- 29 Apr, 2010 1 commit
-
-
Rails.root returns a Pathname and you can now declare your attachment without having to call #to_s first: has_attached_file :avatar, :storage => :s3, :s3_credentials => Rails.root.join('s3.yml') (cherry picked from commit 65d7600b7246cb3bd8f10805fb618e5839694318)
Mike Breen committed
-
- 27 Apr, 2010 1 commit
-
-
Added a rake task for testing all versions. Changed gem statements to use ~> instead of hard versions.
Jon Yurek committed
-
- 26 Apr, 2010 8 commits
-
-
Jon Yurek committed
-
Jon Yurek committed
-
Jon Yurek committed
-
Jon Yurek committed
-
Jon Yurek committed
-
These callbacks are different from pre-rails 3. They do NOT cancel the after_ if the before_ returns false. They will cancell inner callbacks, however, but that's it. This is a change in functionality.
Jon Yurek committed -
Jon Yurek committed
-
Dan Croak committed
-
- 17 Mar, 2010 1 commit
-
-
Joe Ferris committed
-
- 08 Mar, 2010 1 commit
-
-
Determine content_type with file command's --mime-type when content_type is not found in the default cases. (cherry picked from commit 2ca52df1)
Mike Mondragon committed
-
- 31 Dec, 2009 1 commit
-
-
Jon Yurek committed
-
- 18 Dec, 2009 2 commits