Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I use folders in Cloudinary? #3

Open
aaongr opened this issue Oct 7, 2018 · 1 comment
Open

How can I use folders in Cloudinary? #3

aaongr opened this issue Oct 7, 2018 · 1 comment

Comments

@aaongr
Copy link

aaongr commented Oct 7, 2018

In cloudinary api there is the :folder parameter

How can I use it here?

@aaongr
Copy link
Author

aaongr commented Oct 8, 2018

In alchemy_cloudinary/lib/alchemy_cloudinary/dragonfly_data_store.rb:

# override default behaviour by alchemy_cloudinary gem - use folder
module AlchemyCloudinary
  class DragonflyDataStore

    private

      def public_id(uid)
        # ret = File.basename(uid, ext(uid, true))
        ret = "#{Rails.application.class.parent_name}/#{File.basename(uid, ext(uid, true))}"
        puts "\n ****** ITGLOG - public_id - uid: #{uid}, return: #{ret}\n "
        ret
      end
  end
end

My question is: how can I pass to the gem that I want to use the folder or not
I need somewhere a config value like :foldername

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant