title: Shrine 2.9.0

New Plugins

Shrine.plugin :infer_extension

New Features

Shrine.plugin :determine_mime_type, analyzer: :marcel
class PdfUploader < Shrine
  plugin :versions
  plugin :processing

  process(:store) do |io, context|
    [ file1, file2, ... ]
    # or
    { name1: [ file1, file2, ... ], ... }
    # or
    [ { name1: file1 }, ... ]
  end
end
uploaded_file.open  # opens the local or remote file
uploaded_file.read  # read content
uploaded_file.close # close the file
photo.image_attacher(store: :other_store)
photo.update(image: file) # uploads to :other_store

Other improvements

Backwards compatibility