cloudinary / cloudinary_kotlin

Cloudinary Kotlin SDK library
MIT License
10 stars 5 forks source link

SDK not dropping exisitng image/upload in the URL #99

Open ananthrajsingh opened 6 months ago

ananthrajsingh commented 6 months ago

When the URL to be processed contains image/upload, that should be dropped from path to remove duplicacy.

For example: This URL https://something.furlenco.com/image/upload/v1/bucket/products/5900/hero/1702711218.jpg

should be processed to https://res.cloudinary.com/key/image/upload/dpr_1.0,named_trans,w_500/v1/bucket/products/5900/hero/1702711218.jpg? (iOS SDK does this transformation, removing image/upload from the end path)

But Kotlin SDK sends out this https://res.cloudinary.com/key/image/upload/named_trans/c_scale,w_500/dpr_1.0/image/upload/v1/bucket/products/5900/hero/1702711218.jpg? (notice a couple of image/upload)

Checking the iOS SDK, it does have logic to find and drop things like image/upload..

Screenshot 2024-03-29 at 4 51 37 PM

Can you help me understand why is Kotlin SDK not equipped with a similar logic? Due to this we are not able use the same URL format for both Android and iOS clients.

wissam-khalili commented 6 months ago

Hi @ananthrajsingh,

You are right, the current functionality does not exist in the Kotlin SDK, I have opened an internal issue to fix it. For now, you can pass on the public id (with the folders in the path). We will keep you posted when the fix will be released.

Regards, Wissam

ananthrajsingh commented 6 months ago

Sure, thanks for acknowledgement and starting the work towards it. Please do let me know once resolved.

ananthrajsingh commented 4 months ago

@wissam-khalili @adimiz1 Any update on this?

tommyg-cld commented 4 months ago

@ananthrajsingh this is still in our backlog but no ETA at the moment. We will update you as soon as we have a fix.

tommyg-cld commented 2 months ago

@ananthrajsingh this is fixed so please update to the latest version and let us know if you still have issues.

ananthrajsingh commented 2 months ago

Thanks @tommyg-cld for notifying. Will schedule an upgrade with the team and close the ticket if resolved.