Issue with expression?
So I'm making a web app utilizing cloudinary. I have it all set up with mongo as well. when i create an album it'll actually create a new folder in my Cloudinary library and whichever images I upload properly uploads to the library in the correct folder. My issue is actually displaying the album with the images. I logged my BE .get and this is what i log,
listening on 8000
Cloudinary search expression: folder:project_cloud/
Cloudinary response: {
total_count: 0,
time: 2,
rate_limit_allowed: 500,
rate_limit_reset_at: 2023-11-29T23:00:00.000Z,
rate_limit_remaining: 427
}
Cloudinary resources: []
Sending images: []
[nodemon] restarting due to changes...
[nodemon] starting `node index.js`
listening on 8000
It's always an empty array for some reason. It can't find the image at all for some reason. this is my expression.... .expression(`folder:project/${albumId}/`) albumId here is just fetching the albumId. also my albumId is just = req.query; I've also logged my FE and its correct finding the album in the url so im not sure what the issue is. Also the project folder is in my home library, and whatever albums i have are in my project folder
Answers
-
Hi there,
To search inside a folder, you should add
/*
at the end of the expression like this:folder:"project/*" OR cloudinary.v2.search.expression('folder:folder_name/subfolder_name')
If it doesn't help, please provide me with your `cloud_name` and the asset names that you would like to retrieve.
It will be also helpful to share the code of the search expression you are using.
Regards,
Wissam
0