Skip to main content

Best way to avoid duplicated files.



  • Temporary Test

    i found the way, I founded into the docs the manner to how bypass the cdn cache and force it to get the new assets

    The version component is an optional part of Cloudinary delivery URLs that can be added to bypass the CDN cached version and force delivery of the newest asset.


  • Tia Esguerra

    Hi there, 

    Thanks for reaching out and I'm glad you found your answer. 

    I can share some more information that may help you or others in the future. The easiest way to avoid uploading duplicates would be to use the etag value as the public_id of the asset, in conjunction with the overwrite parameter set to false. Note: in order to proceed this way, you would need to calculate the etag value before your upload call, but every language has the functionality to do this.

    So the process would be
    * you generate the etag value on your machine
    * set public_id: <etag value> overwrite: true in your upload call
    * if Cloudinary sees that this public id already exists, we just return the details of the existing resource
    * if the public id does not exist, the file gets uploaded to Cloudinary

    I hope this helps. I will link to some support articles we have that might provide additional information for you

    Hope this helps. Let us know if you need anything.


Post is closed for comments.