Skip to main content

Shrine 3.6.0

New features

  • The S3 storage now accepts :copy_options when initializing. This can be used for supporting Cloudflare R2 by removing :tagging_directive when copying file from temporary to permanent storage. BUCKET, copy_options: {}, **s3_options)

Other improvements

  • Rack 3 is now supported.

  • When duplicating the attacher, the Attacher#context hash is now copied as well, instead of being kept the same between the two attachers.

  • After UploadedFile#close was called, UploadedFile#opened? will return false and the uploaded file can be implicitly re-opened again.

Backwards compatibility

  • Shrine API that is returning a rack response triple will now return headers as an instance of Rack::Headers on Rack 3, which is a subclass of Hash. This should keep user code that references header names in mixed case working (in addition to lowercase), but could theoretically cause issues for code explicitly requiring headers to be an instance of Hash.