Skip to content

Commit

Permalink
add maxFileSize to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Oct 17, 2024
1 parent 89df3ee commit f243ea8
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
4 changes: 4 additions & 0 deletions examples/assets-local/keystone.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { config } from '@keystone-6/core'
import { lists } from './schema'
import bytes from 'bytes'

export default config({
db: {
Expand All @@ -10,6 +11,9 @@ export default config({
prismaClientPath: 'node_modules/myprisma',
},
lists,
server: {
maxFileSize: bytes('40Mb')
},
storage: {
my_images: {
kind: 'local',
Expand Down
4 changes: 3 additions & 1 deletion examples/assets-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
},
"dependencies": {
"@keystone-6/core": "^6.3.0",
"@prisma/client": "5.19.0"
"@prisma/client": "5.19.0",
"bytes": "^3.1.1"
},
"devDependencies": {
"@types/bytes": "^3.1.1",
"prisma": "5.19.0",
"typescript": "^5.5.0"
}
Expand Down
4 changes: 4 additions & 0 deletions examples/assets-s3/keystone.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'dotenv/config'
import { config } from '@keystone-6/core'
import { lists } from './schema'
import bytes from 'bytes'

const {
S3_BUCKET_NAME: bucketName = 'keystone-test',
Expand All @@ -18,6 +19,9 @@ export default config({
prismaClientPath: 'node_modules/myprisma',
},
lists,
server: {
maxFileSize: bytes('8Mb')
},
storage: {
my_images: {
kind: 's3',
Expand Down
2 changes: 2 additions & 0 deletions examples/assets-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
"dependencies": {
"@keystone-6/core": "^6.3.0",
"@prisma/client": "5.19.0",
"bytes": "^3.1.1",
"dotenv": "^16.0.0"
},
"devDependencies": {
"@types/bytes": "^3.1.1",
"prisma": "5.19.0",
"typescript": "^5.5.0"
}
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f243ea8

Please sign in to comment.