cloudinary / cloudinary_npm

Cloudinary NPM for node.js integration
629 stars 323 forks source link

error fetching photos by folder #667

Closed aliosmandev closed 4 months ago

aliosmandev commented 4 months ago

https://cloudinary.com/documentation/admin_api#get_resources_by_asset_folder_examples

When I request the api in the above document with sdk, it gives the error at the bottom and when I try it in postman, it says page not found

Postman Error;

Screenshot 2024-07-01 at 01 46 26

SDK Error;

Screenshot 2024-07-01 at 01 47 41
michalkcloudinay commented 4 months ago

Hi @aliosmandev,

This feature is not supported for clouds using the legacy fixed folder mode (which is the setting on your cloud).
You can read more about this here: https://cloudinary.com/documentation/folder_modes#checking_your_product_environment_folder_mode

Please let us know if you need any further assistance. Thanks, Michal

aliosmandev commented 4 months ago

Thank you for your information, actually my main problem is that when I add the prefix, the direction is not correct, that is, I do "desc", it should come from top to bottom, but it does not come in order, I wonder if I am using it incorrectly.

Screenshot 2024-07-01 at 18 27 42

michalkcloudinay commented 4 months ago

Hi @aliosmandev,

When including the "prefix" parameter, the "direction" parameter is ignored. You can read more about this here: https://cloudinary.com/documentation/admin_api#get_resources (under direction).

Please let us know if you have any further questions.

Thanks, Michal