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
moduleCarrierWavemoduleUploadermoduleProcessingdefprocess(*args)new_processors=args.inject({})do |hash,arg|
arg={arg=>[]}unlessarg.is_a?(Hash)hash.merge!(arg)endcondition_type=new_processors.keys.detect{ |key| [:if,:unless].include?(key)}condition=new_processors.delete(:if) || new_processors.delete(:unless)new_processors.eachdo |processor,processor_args|
self.processors += [[processor,processor_args,condition,condition_type]]ifprocessor == :convert# Treat :convert specially, since it should trigger the file extension changeforce_extensionprocessor_argsendendendend# ClassMethodsendendend
The if processor == :convert clause runs on the class level, ignoring the condition which is evaluated on the instance level, when an actual file is uploaded.
The text was updated successfully, but these errors were encountered:
Given an uploader:
The file extension is always changed to webp, even if
should_convert_to_webp?
returns false.The error was introduced in 3.0.5:
The
if processor == :convert
clause runs on the class level, ignoring thecondition
which is evaluated on the instance level, when an actual file is uploaded.The text was updated successfully, but these errors were encountered: