You can update an asset that was previously fetched and then updated via the original remote URL using one of the following methods:
- Through the UI, you can delete the resource from the Media Library. This will automatically invalidate it on the CDN, and it will be re-fetched when accessed again.
-
Using the API, you can call the explicit method with the public ID (the remote asset URL in this case) and set the
invalidate
flag totrue
. For example, in Node.js:cloudinary.uploader.explicit("URL", { type: "fetch", invalidate: true }, function(result) { console.log(result) });
- Using the API, you can also call the destroy method with the public ID (the remote asset URL in this case) and set the
invalidate
flag totrue
:cloudinary.v2.uploader.destroy("URL", { type: "fetch", invalidate: true }).then(callback);
Note that using the API, the CDN may take a few minutes to fully propagate the purge and display the updated asset.
Comments
0 comments
Please sign in to leave a comment.