β€”

title: Shrine 2.4.0

New features

plugin :default_url_options, store: ->(io, **options) do
  {response_content_disposition: "attachment; filename=\"#{io.original_filename}\""}
end

Other improvements

Backwards compatibility

# now deprecated
Shrine::Storage::S3.new(host: "http://abc123.cloudfront.net", **s3_options)

# can be passed to #url
s3 = Shrine::Storage::S3.new(**s3_options)
s3.url(host: "http://abc123.cloudfront.net")

# or can be set automatically using `default_url_options` plugin
Shrine.plugin :default_url_options, store: {host: "http://abc123.cloudfront.net"}