Prior to version 2.4.0, the conversion of uploaded file data to JSON was happening in
Attacher#writesimply assigned the value that it received to the data attribute of the model instance. During refactoring for 2.4.0, the JSON conversion was accidentally moved to
Attacher#write, which affects anyone who was using
Attacher#writedirectly and passing it a JSON string, by resulting in a double-encoded string being assigned to the data attribute. This has now been reverted.
remove_invalidplugin will now assign back a previous attachment if it was there, in case the assigned cached file was invalid. Before
nilwas always assigned. This enables you to display the previous attachment to the user in case of file validation errors.
UploadedFile#downloadwill now create the Tempfile using
UploadedFile#extension, which handles the case when
#iddoesn't have extension, but
#original_filenamehas (which could be the behaviour of some custom storages)
FileSystem#downloadmethod has been deprecated, and will be removed in
Shrine3. The replacement is to simply use
UploadedFile#download, which will use
FileSystem#opento create a Tempfile in the same way
FileSystem#downloaddid previously. This shouldn't affect you unless you were using