UPGRADING in kt-paperclip-4.4.0 vs UPGRADING in kt-paperclip-5.4.0

- old
+ new

@@ -1,14 +1,17 @@ ################################################## -# NOTE FOR UPGRADING FROM PRE-3.0 VERSION # +# NOTE FOR UPGRADING FROM 4.3.0 OR EARLIER # ################################################## -Paperclip 3.0 introduces a non-backward compatible change in your attachment -path. This will help to prevent attachment name clashes when you have -multiple attachments with the same name. If you didn't alter your -attachment's path and are using Paperclip's default, you'll have to add -`:path` and `:url` to your `has_attached_file` definition. For example: +Paperclip is now compatible with aws-sdk >= 2.0.0. - has_attached_file :avatar, - :path => ":rails_root/public/system/:attachment/:id/:style/:filename", - :url => "/system/:attachment/:id/:style/:filename" +If you are using S3 storage, aws-sdk >= 2.0.0 requires you to make a few small +changes: +* You must set the `s3_region` +* If you are explicitly setting permissions anywhere, such as in an initializer, + note that the format of the permissions changed from using an underscore to + using a hyphen. For example, `:public_read` needs to be changed to + `public-read`. + +For a walkthrough of upgrading from 4 to 5 and aws-sdk >= 2.0 you can watch +http://rubythursday.com/episodes/ruby-snack-27-upgrade-paperclip-and-aws-sdk-in-prep-for-rails-5