—
title: Shrine 2.3.0¶ ↑
New plugins¶ ↑
-
The
copyplugin has been added for copying files from one record to another. Duplicating the model instance will automatically create a copy of the attachment.
Shrine.plugin :copy
photo = Photo.find(photo_id) duplicated_photo = photo.dup # duplicates the attachment photo.image != duplicated_photo.image
photo.image_attacher.copy(other_photo.image_attacher)
New Features¶ ↑
-
The
:directory_permissionsoption has been added toStorage::FileSystemfor specifying UNIX permissions of all directories inside the main directory.
Other improvements¶ ↑
-
Directory permissions are now applied to aoll subdirectories inside the main directory
-
The default UNIX permissions are now 0644 for files and 0755 for directories. Previously it relied on defaults of the operating system.
-
The
backgroundingplugin doesn’t require the model instance to have the#id=writer method anymore. -
The
Attacher#readmethod for returning the value of the underlying column is now public. -
The
Attacher#contextcan now be mutated for an instantiated Attacher object. -
Fixed
Attacher#swapmethod being private after loadingsequeloractiverecordplugin. -
The
recacheplugin behaviour has been extracted intoAttacher#recache, so that it can be used standalone. -
The
movingplugin now works correctly withbackupplugin. -
The
direct_uploadplugin now prevents the client from caching the presign response, by returningCache-Control: no-storeheader.