I'm using the php API do download all the content I have stored on Cloudinary from time to time for a secondary backup. Helps me sleep at night. Until recently it worked 100% of the time. I recently uploaded some large PDF files containing scanned pages to a RaceHistory Folder.
I use the adminApi , resources, getInterator, look for interator key values of 'resources' to get the array and next_cursor to loop.
I save the asset_id, public_id, version, secure_url, format, resource_type to a sql table. I then loop the table and use the secure_URL to download the file. Works almost all the time but getting sporadic errors since adding the RaceHistory folder and it's content.
When I use the API to get the secure_url of the documents in the RaceHistory folder, the api sometimes returns an incorrect URL :
which results in a 404 ajax error when I try to download resource using the above URL.
When I locate that file in your UI, the link I get is:
which is correct or at least allows me to download the file.
Notice both the version number and file name are different. The odd thing is the errors are sporadic and sometimes happen on another file instead but so far never on both. The other file similar affected sometimes is
Please let me know if I'm doing something incorrect that is resulting in an incorrect / non-existent Secure_url being returned.