Skip to main content

get publicId of all images on cloudinary

Comments

3 comments

  • Maor Gariv

    Hi Harish,

    ListResources returns an object that holds the resources' data.

    Please note that you can set MaxResults to be larger than 10 (up to 500).

     

    For example,

         ListResourcesResult res = new ListResourcesResult();
                ListResourcesParams resParam = new ListResourcesParams()
                {
                    MaxResults = 500
                };
                res = cloudinary.ListResources(resParam);
                foreach (var resource in res.Resources){
                    Console.WriteLine(resource.PublicId);
                }

     

    0
  • Harish rathi

    Thanks a lot Maor for the response.

     

    It would still be lot resource heavy to get all the information of image when I just want is public-id's, Is there a way to specify only the information I need?

     

    Thanks, Harish

    0
  • Maor Gariv

    Hi Harish,

     

    We currently don't support getting only custom field in a response but it sounds interesting so I added it as a feature request in your behalf:)

    I'll gladly let you know if and when it's ready and published.

     

    In the meantime, the response holds the basic information on an image (public_id, upload time, version, etc.)

    Please note that it's recommended to save the version together with the public_id in your records to serve the latest image.

    Hope it helps.

     

    Best,

    0

Post is closed for comments.