This release fixes the issue that the public API of the gem was changed in 2.6.0, by switching from RFC 2045 to RFC 4648 standard for base64 strings.
- Switched back to RFC 2045 standard for base64 strings (@lebedev-yury)
- Fixed the issue with base64 string not being validated (#64, @sjdrabbani)
- Sending a base64 string with missing or unknown MIME Type will raise
Carrierwave::Base64::UnknownMimeTypeError
(@lebedev-yury)
- Fixed an incorrect deprecation warning that fired even with
file_name
option set to a Proc (#60, @frodsan)
- Fixed the exception for uploads without
file_name
option set (issue #56 by @hanhdt, fix by @szajbus)
- Fixed the issue with the filename to be set once for a model, and never updated again (@dustMason, #55)
- The uploaded file is not deleted, when the attribute is set to the existing file name (@lebedev-yury, bug-report #51 by @jmuheim)
- The
:file_name
option accepts a lambda with an argument, to which the model instance would be passed. This allows you to set the filename based on some model attribute (@lebedev-yury). - The file extension for the uploaded base64 string is identified automatically, using
MIME::Types
. In case if the mime type for your upload is not identified, you need to add it, usingMIME::Types.add
(@lebedev-yury, @Quintasan, @adamcrown). - Deprecation: Setting the
:file_name
option for the uploader to a string is deprecated. It has to be set to a Proc or lambda that returns a string instead (@lebedev-yury).
- Fixed issue with mongoid models, when
attribute_will_change!
method was called, that wasn't defined in Mongoid models (credits to @cuongnm53)
- Installation on the windows platform is fixed.
- Added proc support for the
:file_name
option for themount_base64_uploader
method. (credits to @hendricius)
- Added
:file_name
option formount_base64_uploader
method. All base64 uploads for this attribute will use the given filename for the stored file. The:file_name
option should not contain the file extention (it will be taken from the content type of base64 string). (@HarenBroog, thanks for the idea)