Skip to main content

How to use enviroment variable instead cloudinary.yml

Comments

4 comments

  • Itay Taragano

    You can use the CLOUDINARY_URL env var as supplied in your Admin Console, and then access it with ENV["CLOUDINARY_URL"]

    0
  • Duyet Nguyen

    Thanks, problem was resolved.

    0
  • Javier Botero
    development:
    cloud_name: ENV["CLOUDINARY_URL"]
    api_key: ENV["CLOUDINARY_URL"]
    api_secret: ENV["CLOUDINARY_URL"]
    enhance_image_tag: true
    static_file_support: false
     
    This would be the way to go?
    0
  • Roee Ben Ari

    Hi Javier, 

    As described in the doc Duyet shared above, you can use environment variables to create any key and store any value you'd like to use in your application.
    ENV["CLOUDINARY_URL"] is meant to store the entire CLOUDINARY_URL variable. If you'd like to store the cloud name, API Key and API Secret as well, you'll have to use something like:

    cloud_name: ENV["CLOUD_NAME"]
    api_key: ENV["API_KEY"]
    api_secret: ENV["API_SECRET"]
    0

Post is closed for comments.