create-payload-app 0.3.24 → 0.3.25
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,28 @@
|
|
1
|
+
import path from 'path';
|
2
|
+
import type { CollectionConfig } from 'payload/types';
|
3
|
+
|
4
|
+
const Media: CollectionConfig = {
|
5
|
+
slug: 'media',
|
6
|
+
upload: {
|
7
|
+
staticDir: path.resolve(__dirname, '../../media'),
|
8
|
+
// Specify the size name that you'd like to use as admin thumbnail
|
9
|
+
adminThumbnail: 'thumbnail',
|
10
|
+
imageSizes: [
|
11
|
+
{
|
12
|
+
height: 400,
|
13
|
+
width: 400,
|
14
|
+
crop: 'center',
|
15
|
+
name: 'thumbnail',
|
16
|
+
},
|
17
|
+
{
|
18
|
+
width: 900,
|
19
|
+
height: 450,
|
20
|
+
crop: 'center',
|
21
|
+
name: 'sixteenByNineMedium',
|
22
|
+
},
|
23
|
+
],
|
24
|
+
},
|
25
|
+
fields: [],
|
26
|
+
};
|
27
|
+
|
28
|
+
export default Media;
|
@@ -4,6 +4,7 @@ import Categories from './collections/Categories';
|
|
4
4
|
import Posts from './collections/Posts';
|
5
5
|
import Tags from './collections/Tags';
|
6
6
|
import Users from './collections/Users';
|
7
|
+
import Media from './collections/Media';
|
7
8
|
|
8
9
|
export default buildConfig({
|
9
10
|
serverURL: 'http://localhost:3000',
|
@@ -15,6 +16,7 @@ export default buildConfig({
|
|
15
16
|
Posts,
|
16
17
|
Tags,
|
17
18
|
Users,
|
19
|
+
Media,
|
18
20
|
],
|
19
21
|
typescript: {
|
20
22
|
outputFile: path.resolve(__dirname, 'payload-types.ts')
|