cloudinary-community / cloudinary-community/astro-cloudinary
[Bug] Acessing all subfolders with cldAssetLoader doesnt seem to work
- Dominant language
- TypeScript
- Stars
- 30
- Forks
- 18
- PR merge metrics
- No merged PRs in 30d
Description
# **Bug Report**
Acessing all subfolders with cldAssetLoader doesnt seem to work
## **Describe the bug**
When I define my collection and point it to a Folder that has Subfolders on Cloudinary it doesnt import all the assets but only the ones directly in this folder.
## **Is this a regression?**
Did not use previous versions
## **Steps To Reproduce the error**
1.
in src/content/config.ts add
export const collections = {
galleryImages: defineCollection({
loader: cldAssetsLoader({
folder: 'MainFolder/FolderContainingSubfolders',
}),
2.
When calling
const galleryImages = await getCollection('galleryImages');
error is returned: The collection "galleryImages" does not exist or is empty. Ensure a collection directory with this name exists.
## **Expected behaviour**
All Iamges in all Subfolder of the Folder "FolderContainingSubfolders" should be imported
## **CodeSandbox or Live Example of Bug**
## **Screenshot or Video Recording**
### **Your environment**
- OS: Windows 11
- Node version: v20.16.0
- Npm version: 10.8.1
- Astro version: v5.0.0-beta.5
- astro-cloudinary version: 1.1.2
## **Additional context**
Contributor guide
Assessment
This issue has not been assessed yet.