I want to have the images in cloudinary in diff folders based on site name
In config/initializers/cloudinary.rb:
# override default behaviour by alchemy_cloudinary gem - use folder
# for default site use application name
# for other sites use the site name
module AlchemyCloudinary
class DragonflyDataStore
private
def public_id(uid)
# ret = File.basename(uid, ext(uid, true))
folder = "#{ApplicationController.helpers.cfg.folder_name}#{Alchemy::Site.current.host == '*' ? '' : '-'+Alchemy::Site.current.name.downcase}"
puts "****** ITGLOG folder: #{folder}"
ret = "#{folder}/#{File.basename(uid, ext(uid, true))}"
# ret = "#{Rails.application.class.parent_name}/#{File.basename(uid, ext(uid, true))}"
ret
end
end
end
It works OK and each image is saved in a different folder with the site name.
I have a problem with image gallery in Alchemy CMS admin, it shows all the images and not only those specific to each site.
When I try to select an image in a specific page of of a specific site, it shows up all the images and not the images filtered by the current site.
What can we do about it?
Thank you in advance
If you are referring to the media library section in your Cloudinary account, the default view/landing page lists all the images in your account. This page by default enlists all images in your account. However, you can use the folder navigation panel on the left to view images per site.