Copy production cloudinary account to staging cloudinary account.
We have 2 environment Production and Staging, We like to copy all the images from production environment to staging environment.
-
Hi Kashish,
In order to move the images from one account to another what you can do is use the get_resources method of the Admin API (https://cloudinary.com/documentation/admin_api#get_resources) to iterate through all the images in your production environment and get their details including the public_id and delivery URL which is returned in the response. Then you can use that delivery URL as the source for uploads using the Upload API (https://cloudinary.com/documentation/image_upload_api_reference#upload_method) to upload each of the images into your staging environment. If you need to keep the same folder structure then you can use the public_id that is returned by the get_resources method and set that specifically in your upload method call.
Best regards,
Aleksandar
0 -
Hello Aleksandar,
We like to sync the production to staging environment not copying the image from production to staging.
For example:
If production has image1, image2 and image3 and on staging we have image1 and image2. We just need to sync the image3 from from production to staging.
Regards
Kashish
0 -
Hi Kashish,
You could utilize our auto-upload feature in order in order sync between two accounts.
You could read more about that approach and how to achieve that here.
Note that this would still require first copying all of the files from one account to another. Later on, once an image is added you could also call it on the staging account, and it would be uploaded to that account from the production account.
Let us know if that makes sense?
0
Post is closed for comments.
Comments
3 comments