Changelog History
Page 3
-
v2.12.0 Changes
August 22, 2018Ignore nil values when assigning files from a remote URL (@janko)
Ignore nil values when assigning files from a data URI (@GeekOnCoffee)
Raise
Shrine::Error
when child process failed to be spawned in:file
MIME type analyzer (@hmistry)๐ Use the appropriate unit in error messages of filesize validators in
validation_helpers
plugin (@hmistry)๐ Fix subclassing not inheriting storage resolvers from superclass in
dynamic_storage
plugin (@janko)๐ Un-deprecate assigning cached versions (@janko)
Add
Attacher#assign_remote_url
which allows dynamically passing downloader options (@janko)๐ Deprecate
:storages
option indownload_endpoint
plugin in favour ofUploadedFile#download_url
(@janko)โ Add
:redirect
option todownload_endpoint
plugin for redirecting to the uploaded file (@janko)๐ Fix encoding issues when uploading IO object with unknown size to S3 (@janko)
Accept additional
File.open
arguments inFileSystem#open
(@janko)โ Add
:rewindable
option toS3#open
for disabling caching of read content to disk (@janko)๐ Make
UploadedFile#open
always open a new IO object and close the previous one (@janko)
-
v2.11.0 Changes
April 28, 2018โ Add
Shrine.with_file
for temporarily converting an IO-like object into a file (@janko)โ Add
:method
value to theS3#presign
result indicating the HTTP verb that should be used (@janko)โ Add ability to specify
method: :put
inS3#presign
to generate data for PUT upload (@janko)Return a
Struct
instead of aAws::S3::PresignedPost
object inS3#presign
(@janko)๐ Deprecate
Storage#presign
returning a custom object inpresign_endpoint
(@janko)๐ Allow
Storage#presign
to return a Hash inpresign_endpoint
(@janko)โ Add ability to specify upload checksum in
upload_endpoint
plugin (@janko)๐ Don't raise exception in
:mini_magick
and:ruby_vips
dimensions analyzers when image is invalid (@janko)Don't remove bucket name from S3 URL path with
:host
when:force_path_style
is set (@janko)Correctly determine MIME type from extension of empty files (@janko)
Modify
UploadedFile#download
not to reopen the uploaded file if it's already open (@janko)โ Add
UploadedFile#stream
for streaming content into a writable object (@janko)๐ Deprecate
direct_upload
plugin in favor ofupload_endpoint
andpresign_endpoint
plugins (@janko)
-
v2.10.0 Changes
March 28, 2018Add
:fastimage
analyzer todetermine_mime_type
plugin (@mokolabs)๐ Keep download endpoint URL the same regardless of metadata ordering (@MSchmidt)
Remove
:rack_mime
extension inferrer from theinfer_extension
plugin (@janko)๐ Allow
UploadedFile#download
to accept a block for temporary file download (@janko)Add
:ruby_vips
analyzer tostore_dimensions
plugin (@janko)Add
:mini_magick
analyzer tostore_dimensions
plugin (@janko)๐ฒ Soft-rename
:heroku
logging format to:logfmt
(@janko)๐ Deprecate
Shrine::IO_METHODS
constant (@janko)Don't require IO size to be known on upload (@janko)
Inherit the logger on subclassing
Shrine
and make it shared across subclasses (@hmistry)
-
v2.9.0 Changes
January 27, 2018๐ Support arrays of files in
versions
plugin (@janko)Added
:marcel
analyzer todetermine_mime_type
plugin (@janko)๐ Deprecate
:filename
option of thedata_uri
plugin in favour of the newinfer_extension
plugin (@janko)โ Add
infer_extension
plugin for automatically deducing upload location extension from MIME type (@janko)0๏ธโฃ Apply default storage options passed via
Attachment.new
inbackgrounding
plugin (@janko)๐ Fix S3 storage replacing spaces in filename with "+" symbols (@ndbroadbent)
๐ Deprecate the
multi_delete
plugin (@janko)๐ Allow calling
UploadedFile#open
without passing a block (@hmistry)โ Delete tempfiles in case of errors in
UploadedFile#download
andStorage::S3#download
(@hmistry)Freeze all string literals (@hmistry)
๐ Allow passing options to
Model#<attachment>_attacher
for overridingAttacher
options (@janko)
-
v2.8.0 Changes
October 11, 2017Expand relative directory paths when initializing
Storage::FileSystem
(@janko)๐ Fix
logging
plugin erroring on:json
format when ActiveSupport is loaded (@janko)๐ Allow
Storage::S3#clear!
to take a block for specifying which objects to delete (@janko)๐ Make
:filemagic
analyzer close the FileMagic descriptor even in case of exceptions (@janko)๐ Make
:file
analyzer work for potential file types which have magic bytes farther than 256 KB (@janko)๐ Deprecate
aws-sdk
2.x in favour of the newaws-sdk-s3
gem (@janko)Modify
UploadedFile#extension
to always return the extension in lowercase format (@janko)Downcase the original file extension when generating an upload location (@janko)
๐ Allow specifying the full record attribute name in
metadata_attributes
plugin (@janko)๐ Allow specifying metadata mappings on
metadata_attributes
plugin initialization (@janko)Add support for ranged requests in
download_endpoint
andrack_response
plugins (@janko)๐ Allow
Storage::S3#open
andStorage::S3#download
to accept additional options (@janko)Forward any options given to
UploadedFile#open
orUploadedFile#download
to the storage (@janko)โก๏ธ Update
direct_upload
plugin to support Roda 3 (@janko)
-
v2.7.0 Changes
September 11, 2017๐ Deprecate the
Shrine::DownloadEndpoint
constant overShrine.download_endpoint
(@janko)๐ Allow an additional
#headers
attribute on presigns and return it inpresign_endpoint
(@janko)Allow overriding
upload_endpoint
andpresign_endpoint
options per-endpoint (@janko)Add
:presign
and:rack_response
options topresign_endpoint
(@janko)Add
:upload
,:upload_context
and:rack_response
options toupload_endpoint
(@janko)Modify
upload_endpoint
andpresign_endpoint
to returntext/plain
error responses (@janko)โ Add
:request
upload context parameter inupload_endpoint
(@janko)๐ Change
:action
upload context parameter to:upload
inupload_endpoint
(@janko)Return
405 Method Not Allowed
on invalid HTTP verb inupload_endpoint
andpresign_endpoint
(@janko)Modify
upload_endpoint
andpresign_endpoint
to handle requests on the root URL (@janko)Allow creating Rack apps dynamically in
upload_endpoint
andpresign_endpoint
(@janko)Remove Roda dependency from
upload_endpoint
andpresign_endpoint
plugins (@janko)๐ Split
direct_upload
plugin intoupload_endpoint
andpresign_endpoint
plugins (@janko)๐ Support the new
aws-sdk-s3
gem inShrine::Storage::S3
(@lizdeika)Return
Cache-Control
header indownload_endpoint
to permanently cache responses (@janko)Return
404 Not Found
when uploaded file doesn't exist indownload_endpoint
(@janko)๐ Utilize uploaded file metadata when generating response in
download_endpoint
(@janko)๐ Fix deprecation warning when generating fake presign with query parameters (@janko)
๐ฉ Don't raise error in
file
andfilemagic
MIME type analyzer on empty IO (@ypresto)๐ Require
down
inremote_url
plugin even when a custom downloader is given (@janko)๐ Require
time
library inlogging
plugin to fixundefined method #iso8601 for Time
(@janko)๐ Allow validations defined on a superclass to be reused in a subclass (@printercu)
๐ Allow validation error messages to be an array of arguments for ActiveRecord (@janko)
๐ Allow model subclasses to override the attachment with a different uploader (@janko)
Accept
Attacher.new
options likestore:
andcache:
viaAttachment.new
(@ypresto)Raise
ArgumentError
when:bucket
option is nil inShrine::Storage::S3#initialize
(@janko)Don't wrap base64-encoded content into 60 columns in
UploadedFile#base64
and#data_uri
(@janko)Add
:mini_mime
option todetermine_mime_type
plugin for using the mini_mime gem (@janko)๐ Fix
data_uri
plugin raising an exception on Ruby 2.4.1 when using raw data URIs (@janko)Implement
Shrine::Storage::S3#open
using the aws-sdk gem instead ofDown.open
(@janko)๐ Un-deprecate
Shrine.uploaded_file
accepting file data as JSON string (@janko)Don't wrap base64-formatted signatures to 60 columns (@janko)
Don't add a newline at the end of the base64-formatted signature (@janko)
-
v2.6.1 Changes
April 12, 2017- ๐ Fix
download_endpoint
returning incorrect reponse body in some cases (@janko)
- ๐ Fix
-
v2.6.0 Changes
April 04, 2017๐ Make
Shrine::Storage::FileSystem#path
public which returns path to the file as aPathname
object (@janko)Add
Shrine.rack_file
torack_file
plugin for converting Rack uploaded file hash into an IO (@janko)๐ Deprecate passing a Rack file hash to
Shrine#upload
(@janko)Expose
Shrine.extract_dimensions
andShrine.dimensions_analyzers
instore_dimensions
plugin (@janko)โ Add
metadata_attributes
plugin for syncing attachment metadata with additional record attributes (@janko)Remove the undocumented
:magic_header
option fromdetermine_mime_type
plugin (@janko)Expose
Shrine.determine_mime_type
andShrine.mime_type_analyzers
indetermine_mime_type
plugin (@janko)โ Add
signature
plugin for calculating a SHA{1,256,384,512}/MD5/CRC32 hash of a file (@janko)๐ Return the resolved plugin module when calling
Shrine.plugin
(@janko)๐ Accept hash of metadata with symbol keys as well in
add_metadata
block (@janko)โ Add
refresh_metadata
plugin for re-extracting metadata from an uploaded file (@janko)๐ Allow S3 storage to use parallelized multipart upload for files from FileSystem storage as well (@janko)
๐ Improve default multipart copy threshold for S3 storage (@janko)
๐ Allow specifying multipart upload and copy thresholds separately in
Shrine::Storage::S3
(@janko)๐ Fix
Storage::FileSystem#clear!
not deleting old files if there are newer files in the same directory (@janko)๐ Allow media type in the data URI to have additional parameters (@janko)
URI-decode non-base64 data URIs, as such data URIs are URI-encoded according to the specification (@janko)
๐ Improve performance of parsing data URIs by 10x switching from a regex to StringScanner (@janko)
โฌ๏ธ Reduce memory usage of
Shrine.data_uri
andUploadedFile#base64
by at least 2x (@janko)Add
Shrine.data_uri
todata_uri
plugin which parses and converts the given data URI to an IO object (@janko)๐ Make
rack_file
plugin work with HashWithIndifferentAccess-like objects such as Hashie::Mash (@janko)๐ฆ Expose
Aws::S3::Client
viaShrine::Storage::S3#client
, and deprecateShrine::Strorage::S3#s3
(@janko)๐ Modify
delete_raw
plugin to delete any IOs that respond to#path
(@janko)Require the Tempfile standard library in lib/shrine.rb (@janko)
๐ Deprecate dimensions validations passing when a dimension is nil (@janko)
๐ Deprecate passing regexes to type/extension whitelists/blacklists in
validation_helpers
(@janko)0๏ธโฃ Don't include list of blacklisted types and extensions in default
validation_helpers
messages (@janko)๐ Improve default error messages in
validation_helpers
plugin (@janko)๐ Don't require the
benchmark
standard library inlogging
plugin (@janko)Don't dirty the attacher in
Attacher#set
when attachment hasn't changed (@janko)๐ Rename
Attacher#attached?
to a more accurateAttacher#changed?
(@janko)๐ Allow calling
Attacher#finalize
if attachment hasn't changed, instead of raising an error (@janko)๐ Make
Shrine::Storage::S3#object
method public (@janko)Prevent autoloading race conditions in aws-sdk gem by eager loading the S3 service (@janko)
Raise
Shrine::Error
whenShrine#generate_location
returns nil (@janko)
-
v2.5.0 Changes
November 11, 2016โ Add
Attacher.default_url
as the idiomatic way of declaring default URLs (@janko)๐ Allow uploaders themselves to accept Rack uploaded files when
rack_file
is loaded (@janko)Raise a descriptive error when two versions are pointing to the same IO object (@janko)
๐ Make
backgrounding
plugin work with plain model instances (@janko)๐ Make validation methods in
validation_helpers
plugin return whether validation succeeded (@janko)๐ Make extension matching case insensitive in
validation_helpers
plugin (@jonasheinrich)๐ Make
remove_invalid
plugin remove dirty state on attacher after removing invalid file (@janko)๐ฉ Raise error if
Shrine::UploadedFile
isn't initialized with valid data (@janko)๐ Accept
extension
parameter without the dot in presign endpoint ofdirect_upload
plugin (@jonasheinrich)Add
:fallback_to_original
option toversions
plugin for disabling fallback to original file (@janko)โ Add
#dimensions
method toUploadedFile
when loadingstore_dimensions
plugin (@janko)๐ Make it possible to extract multiple metadata values at once with the
add_metadata
plugin (@janko)
-
v2.4.1 Changes
October 17, 2016๐ Move back JSON serialization from
Attacher#write
toAttacher#_set
(@janko)๐ Make
remove_invalid
plugin assign back a previous attachment if was there (@janko)๐ Deprecate
Storage::FileSystem#download
(@janko)In
UploadedFile#download
use extension from#original_filename
if#id
doesn't have it (@janko)