You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current version of CarrierWave if you have an uploader defined like this:
classLogoUploader < CarrierWave::Uploader::Base# ... deffilename"original.#{model.logo.file.extension}"iforiginal_filenameendversion:smalldoprocess:resize_to_fit=>[190,190]process:convert=>'png'endversion:icondoprocess:resize_to_fill=>[50,50]process:convert=>'png'end# ... end
and attach a file name somefile.jpg, you will end up with files named original.jpg, original_small.png and original_icon.png respectively.
If you want to set a specific file name for each version, you cannot simply nest another filename method inside the version. Instead, you will need to override the full_filename method that is originally defined in the CarrierWave::Uploader::Versions module. An example would look like this: