cloudinary_angular icon indicating copy to clipboard operation
cloudinary_angular copied to clipboard

No documentation to change domain and subdomain

Open chris480 opened this issue 4 years ago • 6 comments

I see that CloudinaryConfiguration has a field for cdn_domain There is no clear way to set it as described in the documentation

Versions and Libraries (fill in the version numbers)

Angular Cloudinary SDK - 5.x

chris480 avatar Aug 07 '20 17:08 chris480

@chris480 if you have a cname on your account (available for our advance plan and higher) you can add it in the config by copy and paste from your dashboard. It will look like: CLOUDINARY_URL=cloudinary://XXXX:XXXX@XXXX?cname=

shirlymanor avatar Aug 07 '20 20:08 shirlymanor

@shirlymanor So something like this?

CloudinaryModule.forRoot({Cloudinary}, { cloud_name: 'your_cloud_name', cname: 'cdn.company.com' } as CloudinaryConfiguration),

chris480 avatar Aug 07 '20 20:08 chris480

Here is an example:

<CloudinaryContext cname="media.mysite.com" cloudName="mysite" privateCdn>
  <CloudinaryImage publicId="myImage" />
</CloudinaryContext>

shirlymanor avatar Aug 07 '20 22:08 shirlymanor

Isn't that the React setup?

chris480 avatar Aug 08 '20 02:08 chris480

Hi @chris480,

This should work:

CloudinaryModule.forRoot({Cloudinary}, { cloud_name: 'your_cloud_name', cname: 'cdn.company.com' } as CloudinaryConfiguration),

michalkcloudinay avatar Aug 10 '20 19:08 michalkcloudinay

Thanks.

chris480 avatar Aug 13 '20 03:08 chris480