:mini_magickanalyzer has been added to the
store_dimensionsplugin, which uses the MiniMagick gem to extract image dimensions.
:ruby_vipsanalyzer has been added to the
store_dimensionsplugin, which uses the ruby-vips gem to extract image dimensions.
:fastimageanalyzer has been added to the
determine_mime_typeplugin, which uses the FastImage gem to determine the MIME type of the file.
Shrine::UploadedFile#downloadnow accepts a block for downloading an uploaded file temporarily. This is useful when wanting to validate whether an uploaded image is valid or corrupted, or when generating thumbnails.
uploaded_file.download do |tempfile|# ...end # tempfile is deleted
It's not required that IO objects respond to
#sizeanymore. This is useful when uploading streams of data where the size is not known.
The S3 storage now supports IO objects with unknown size. Under the hood it will use multipart upload.
The logger is now properly inherited and shared between
The attachment URL generated by
download_endpointnow stays the same regardless of the order of elements in the metadata hash. Previously it could change after the uploaded file data is loaded from the database, because the order of the metadata hash elements would change, which is not desirable for caching.
:rack_mimeextension inferrer has been removed from the
infer_extensionplugin, due to not having acceptable behaviour. The new default extension inferrer is
:herokuformatter in the
loggingplugin has been soft-renamed to
:herokualias will stop being supported in Shrine 3.
Shrine::IO_METHODSconstant has been depreacted, and will become private in Shrine 3.