cloudex icon indicating copy to clipboard operation
cloudex copied to clipboard

Allow passing cloud name to `Cloudex.Url.for/2`?

Open nathanl opened this issue 8 years ago • 3 comments

Great library, thanks! 👍 😄

Would you consider a PR to accept the cloud name as a parameter to Cloudex.Url.for/2, leaving the configured value as the default?

I'm currently working around not having this by replacing the cloud name in the returned URL.

    [start, rest] = Regex.split(
      ~r/(http|https):\/\/res.cloudinary.com\/(?<cloud_name>\w+)\/.*/,
      url, on: [:cloud_name]
    )
    Enum.join([start, desired_cloud_name, rest])

nathanl avatar Sep 15 '17 16:09 nathanl

Hi,

Sorry for the slow response, slipped my mind :/ Yes, a PR to override the cloud name would be fine :)

Gerard.

smeevil avatar Sep 19 '17 08:09 smeevil

Hi @nathanl,

Wondering if this is still something you would like to change or need ?

Gerard.

smeevil avatar Oct 16 '17 11:10 smeevil

It's not an urgent need - we're working around it right now. I just haven't gotten around to making a PR yet. :)

nathanl avatar Oct 16 '17 13:10 nathanl