Skip to content

[Bug] Acessing all subfolders with cldAssetLoader doesnt seem to work #62

@joshuabinswanger

Description

@joshuabinswanger

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

in src/content/config.ts add

export const collections = {
galleryImages: defineCollection({
loader: cldAssetsLoader({
folder: 'MainFolder/FolderContainingSubfolders',
}),

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions