This support forum is no longer in use. Please use the Cloudinary Community at https://community.cloudinary.com/ to receive assistance from other members of the community and from Cloudinary's support team. For account-specific questions or if you believe that you've encountered a bug, please contact the Cloudinary team directly via the "submit a request" option on this support site.

Best way to avoid duplicated files.

Comments

2 comments

  • Avatar
    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.

    Thanks!!

    0
    Comment actions Permalink
  • Avatar
    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
    https://support.cloudinary.com/hc/en-us/articles/208158309-How-can-I-completely-prevent-the-existence-of-image-duplications-on-my-Cloudinary-account-

    https://support.cloudinary.com/hc/en-us/articles/207441825-How-can-Cloudinary-help-me-to-avoid-duplications-on-my-account-

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

    0
    Comment actions Permalink

Post is closed for comments.