payloadcms / payload

The best way to build a modern backend + admin UI. No black magic, all TypeScript, and fully open-source, Payload is both an app framework and a headless CMS.
https://payloadcms.com
MIT License
21.04k stars 1.27k forks source link

Upload collections don't use gallery view #6889

Open TSFoster opened 1 week ago

TSFoster commented 1 week ago

Link to reproduction

No response

Payload Version

v3.0.0-beta.56

Node Version

v22.3.0

Next.js Version

v15.0.0-rc.0

Describe the Bug

From the docs (for v2), when allowing uploads on a collection:

The Admin panel will modify its built-in List component to show a thumbnail gallery of your Uploads instead of the default Table view

I don't believe there's any way to get this thumbnail gallery in v3. Is that correct? Are there plans for it?

Thanks

Reproduction Steps

const upload: UploadConfig = {
  staticDir: 'public/uploads',
  mimeTypes: ['image/*'],
  adminThumbnail: ({doc}) => `/uploads/${doc.filename}`,
}

export const MediaCollection: CollectionConfig = {
  slug: 'media',
  admin: {
    useAsTitle: 'title',
    defaultColumns: ['title', 'filename'],
  },
  upload,
  fields: [
    {
      name: 'title',
      type: 'text',
      index: true,
    },
  ],
}

Adapters and Plugins

No response