aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-03 11:10:40 +0100
committerChocobozzz <me@florianbigard.com>2018-01-03 11:10:40 +0100
commit01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea (patch)
tree9e01809f09adbcd512a8dedf73093a123f88e02c /server/controllers
parent47564bbe2eeb2baae9b7e3f9b2b8d16522bc7e04 (diff)
downloadPeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.tar.gz
PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.tar.zst
PeerTube-01de67b9a4fcdf01102ccc3cb7dc24beebf6c7ea.zip
Add avatar max size limit
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/config.ts15
1 files changed, 14 insertions, 1 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 2f1132904..35c89835b 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -1,7 +1,7 @@
1import * as express from 'express' 1import * as express from 'express'
2import { isSignupAllowed } from '../../helpers/utils' 2import { isSignupAllowed } from '../../helpers/utils'
3 3
4import { CONFIG } from '../../initializers' 4import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers'
5import { asyncMiddleware } from '../../middlewares' 5import { asyncMiddleware } from '../../middlewares'
6import { ServerConfig } from '../../../shared' 6import { ServerConfig } from '../../../shared'
7 7
@@ -24,6 +24,19 @@ async function getConfig (req: express.Request, res: express.Response, next: exp
24 }, 24 },
25 transcoding: { 25 transcoding: {
26 enabledResolutions 26 enabledResolutions
27 },
28 avatar: {
29 file: {
30 size: {
31 max: CONSTRAINTS_FIELDS.ACTORS.AVATAR.FILE_SIZE.max
32 },
33 extensions: CONSTRAINTS_FIELDS.ACTORS.AVATAR.EXTNAME
34 }
35 },
36 video: {
37 file: {
38 extensions: CONSTRAINTS_FIELDS.VIDEOS.EXTNAME
39 }
27 } 40 }
28 } 41 }
29 42