Download next.js/examples/cms-payload/payload/collections/Media.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 339 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-payload/payload/collections/Media.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-payload/payload/collections/Media.ts
-
curl -L -o Media.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-payload/payload/collections/Media.ts
339 Bytes
| import { CollectionConfig } from "payload/types"; | |
| import path from "path"; | |
| export const Media: CollectionConfig = { | |
| slug: "media", | |
| upload: { | |
| staticDir: path.resolve(__dirname, "../../media"), | |
| }, | |
| access: { | |
| read: () => true, | |
| }, | |
| fields: [ | |
| { | |
| name: "alt", | |
| type: "text", | |
| required: true, | |
| }, | |
| ], | |
| }; | |