mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 17:59:37 +02:00
Add avatar max size limit
This commit is contained in:
parent
47564bbe2e
commit
01de67b9a4
17 changed files with 226 additions and 30 deletions
|
@ -1,7 +1,7 @@
|
|||
import * as express from 'express'
|
||||
import { isSignupAllowed } from '../../helpers/utils'
|
||||
|
||||
import { CONFIG } from '../../initializers'
|
||||
import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers'
|
||||
import { asyncMiddleware } from '../../middlewares'
|
||||
import { ServerConfig } from '../../../shared'
|
||||
|
||||
|
@ -24,6 +24,19 @@ async function getConfig (req: express.Request, res: express.Response, next: exp
|
|||
},
|
||||
transcoding: {
|
||||
enabledResolutions
|
||||
},
|
||||
avatar: {
|
||||
file: {
|
||||
size: {
|
||||
max: CONSTRAINTS_FIELDS.ACTORS.AVATAR.FILE_SIZE.max
|
||||
},
|
||||
extensions: CONSTRAINTS_FIELDS.ACTORS.AVATAR.EXTNAME
|
||||
}
|
||||
},
|
||||
video: {
|
||||
file: {
|
||||
extensions: CONSTRAINTS_FIELDS.VIDEOS.EXTNAME
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue