Different folders for media library

Hello community, In my config CMS, I have the following configurations

media_folder: “/src/images/uploads”
public_folder: “/images/uploads”

Then in my collections, I can do something like this (assuming I named my collection);

{ label: “Add Image”, name: “image”, widget: “image” }
{ label: “Upload a PDF”, name: “pdf”, widget: “file” }

The issue is, if the image and the file (pdf) are uploaded, they will both end in /src/images/uploads.

But I want the PDF to be uploaded to /src/assets/ebooks/ folder.

How do I go about this? Any help?

You can set folders per collection: https://www.netlifycms.org/docs/beta-features/#folder-collections-media-and-public-folder

Folders per file extension is not yet supported I think, but it makes sense and would make a good feature request

1 Like