Open aaongr opened 5 years ago
I just had to override the public_id
method. In config/initializers/solidus_cloudinary.rb
:
module Cloudinary::CarrierWave
def public_id
# TODO: add/upload second file does not work! needs refresh page!
return "#{Rails.application.class.parent_name.downcase}/#{File.basename(@filename.downcase, File.extname(@filename.downcase))}-#{Cloudinary::Utils.random_public_id}"
end
end
I would like to upload the images in a specific folder and not in the root of the cloudinary space... Any ideas how can I do this?