URL suffix and root path exception
djmj opened this issue · 3 comments
djmj commented
SEO suffix are enabled for all plans and do not require private CDN.
Suffix
cloudinaryUrl.suffix(fileName)
Exception
java.lang.IllegalArgumentException: URL Suffix only supported in private CDN
at com.cloudinary.Url.generate(Url.java:333)
RootPath
cloudinaryUrl.useRootPath(true)
Exception
java.lang.IllegalArgumentException: Root path only supported in private CDN
at com.cloudinary.Url.generate(Url.java:333)
https://cloudinary.com/blog/how_to_dynamically_create_seo_friendly_urls_for_your_site_s_images
roeeba commented
Hi @djmj. We couldn't reproduce the issue. Could you please make sure you're running the latest version of the package, and if not, update and try again? let us know if that helps?
aditimadan-Cloudinary commented
Sharing the code from the ticket for future readers:
String url=cloudinary.url().suffix("inline").format("pdf").imageTag("sample");
System.out.println(url);
Response: <img src='http://res.cloudinary.com/***/images/sample/inline.pdf'/>