Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListResourcesByPrefixParams - Mark ResourceType Enum as FLAG #362

Open
nazarkryp opened this issue Feb 28, 2024 · 1 comment
Open

ListResourcesByPrefixParams - Mark ResourceType Enum as FLAG #362

nazarkryp opened this issue Feb 28, 2024 · 1 comment

Comments

@nazarkryp
Copy link

Feature request for Cloudinary .NET SDK

Mark resourceType enum with flag so you could specify both images and videos

image

Explain your use case

Currently you have to do something like this to retrieve both images and photos:

var @params1 = new ListResourcesByPrefixParams
{
    ResourceType = ResourceType.Video,
    Type = "upload",
    Prefix = "SomeFolder",
};

var resources1 = await _cloudinary.ListResourcesAsync(@params1);

var @params2 = new ListResourcesByPrefixParams
{
    ResourceType = ResourceType.Image,
    Type = "upload",
    Prefix = "SomeFolder",
};

var resources2 = await _cloudinary.ListResourcesAsync(@params1);

var resources = resources1.Resources.Concat(resources2.Resources);
@tommyg-cld
Copy link

@nazarkryp so that api has a default resource type of image for now and when looking for video/raw, you have to specify it.

however, you can use Search API as per https://cloudinary.com/documentation/admin_api#search_for_resources which will return all resource types of default unless specified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants