:namespaceoption to pretty_location plugin for including the model namespace into the location.
:include_erroroption to remote_url plugin which gives you access to the download error instance when generating the error message.
<attachment>_stored?to migration_helpers for easier handling of uploading logic in ORM hooks:
if column_changed?(:image) && image_stored? # promote# ...endsuperendend
Fixed uploading an S3 file making an additional unneeded GET request in addition to the S3 COPY request.
When the model with an attachment is namespaced, the namespace isn't included in the location anymore when using the pretty_location plugin.
Dumped Down version to 2.0.0 to fix downloading files from URLs which have "" characters in them.
The IO is now rewinded even if FastImage fails to extract dimensions from the IO
The IO is now rewinded when using MimeMagic to extract the MIME type.
When uploading a
Shrine::UploadedFile, the default location generator will first look for the extension in
#idbefore looking at
The remote_url plugin now returns separate error messsages when file wasn't found and when the file was too large.
Fixed promoting raising an error if the record got deleted before promoting finished
nilwhen corresponding metadata keys are missing instead of raising a
Fixed errors being able to accumulate on the record object when errors occur in data_uri and remote_url plugins.
The "metadata" key isn't required anymore when instantiating a
The top-level key-values aren't cached anymore when instantiating a
Shrine::UploadedFile, which means that
#metadatawill now pick up any mutations on the data hash.
Removed a deprecation warning in the S3 storage which occurs when AWS credentials are inferred implicitly.
The extracted metadata is now accessible inside
:metadatakey in the
Shrine#uploaddoesn't mutate the given context hash anymore.
Shrine::Attacher#backup_filefrom the backup plugin doesn't modify the input
- The keep_location plugin is deprecated, as the same behaviour can easily be
achieved by overriding
if io.is_a?(UploadedFile) && context[:phase] == :storeio.idelsesuperendendend