You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi everyone! We recently upgraded from 3.0.1+7 to 4.0.1+9 version of the package, and found a problem. Not sure if we are missing something new or is it really a bug
We can see now that the generate() method now removes the last part of an image's public id, if this id has any dots in it. Specifically, it removes the part after the last dot (like it is removing the file extension)
Thing is, public ids don't have extensions, so this does not have any effect, expect for file names with dots. Is this intentional? What is the purpose behind this new logic?
Thank you
The text was updated successfully, but these errors were encountered:
Hi, thanks for reporting this. I'll explain the situation.
The generate() function in CloudinaryTransformation is not the one that removes the last .xyz, it is the CloudinaryImage constructor the one that does that removal. This constructor receives a cloudinary resource url as parameter and extracts the public_id from it, in the process it removes as you noticed the last possible .ext if it has one; e.g: tempPublicId = tempPublicId.substring(0, lastDotIndex);. So far I have created only the CloudinaryImage class which will match the CloudinaryResourceType.image type from API. So according to official documentation:
The Public ID value for images and videos should not include a file extension. Include the file extension for raw files only.
That's why the CloudinaryImage constructor does the .ext removal from public_id when extracting it from url.
The current logic implemented in the last breaking change version ^4.0.0 is the same as ^3.0.0 regarding the .ext removal from public_id in the CloudinaryImage constructor.
If you are experiencing some problem while using image transformations with this logic, let me know to see how we can fix it.
Hi everyone! We recently upgraded from 3.0.1+7 to 4.0.1+9 version of the package, and found a problem. Not sure if we are missing something new or is it really a bug
We can see now that the generate() method now removes the last part of an image's public id, if this id has any dots in it. Specifically, it removes the part after the last dot (like it is removing the file extension)
Thing is, public ids don't have extensions, so this does not have any effect, expect for file names with dots. Is this intentional? What is the purpose behind this new logic?
Thank you
The text was updated successfully, but these errors were encountered: