title: Shrine 1.1.0

New plugins

plugin :backup, storage: :backup_store
User.create(avatar: image) # uploads to :store and :backup_store
plugin :upload_options, store: ->(io, context) do
  if [:original, :thumb].include?(context[:version])
    {acl: "public-read"}
  else
    {acl: "private"}
  end
end
plugin :keep_location, :cache => :store
user = User.new
user.avatar = image
user.avatar.storage_key #=> :cache
user.avatar.id #=> "abc123.jpg"

user.save
user.avatar.storage_key #=> :store
user.avatar.id #=> "abc123.jpg"
plugin :default_url do |context|
  "/#{context[:name]}/missing.jpg"
end
user = User.new
user.avatar_url #=> "/avatar/missing.jpg"

New storages

New features

Shrine::Storage::S3.new(upload_options: {acl: "public-read"}, **s3_options)

Other improvements

Backwards compatibility