aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts19
1 files changed, 15 insertions, 4 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 3a5a557d4..50a29dc43 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -9,7 +9,7 @@ import { isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core
9 9
10// --------------------------------------------------------------------------- 10// ---------------------------------------------------------------------------
11 11
12const LAST_MIGRATION_VERSION = 145 12const LAST_MIGRATION_VERSION = 150
13 13
14// --------------------------------------------------------------------------- 14// ---------------------------------------------------------------------------
15 15
@@ -172,7 +172,10 @@ const CONSTRAINTS_FIELDS = {
172 ACTOR: { 172 ACTOR: {
173 PUBLIC_KEY: { min: 10, max: 5000 }, // Length 173 PUBLIC_KEY: { min: 10, max: 5000 }, // Length
174 PRIVATE_KEY: { min: 10, max: 5000 }, // Length 174 PRIVATE_KEY: { min: 10, max: 5000 }, // Length
175 URL: { min: 3, max: 2000 } // Length 175 URL: { min: 3, max: 2000 }, // Length
176 AVATAR: {
177 EXTNAME: [ '.png', '.jpeg', '.jpg' ]
178 }
176 }, 179 },
177 VIDEO_EVENTS: { 180 VIDEO_EVENTS: {
178 COUNT: { min: 0 } 181 COUNT: { min: 0 }
@@ -250,6 +253,12 @@ const VIDEO_MIMETYPE_EXT = {
250 'video/mp4': '.mp4' 253 'video/mp4': '.mp4'
251} 254}
252 255
256const AVATAR_MIMETYPE_EXT = {
257 'image/png': '.png',
258 'image/jpg': '.jpg',
259 'image/jpeg': '.jpg'
260}
261
253// --------------------------------------------------------------------------- 262// ---------------------------------------------------------------------------
254 263
255const SERVER_ACTOR_NAME = 'peertube' 264const SERVER_ACTOR_NAME = 'peertube'
@@ -291,7 +300,8 @@ const STATIC_PATHS = {
291 PREVIEWS: '/static/previews/', 300 PREVIEWS: '/static/previews/',
292 THUMBNAILS: '/static/thumbnails/', 301 THUMBNAILS: '/static/thumbnails/',
293 TORRENTS: '/static/torrents/', 302 TORRENTS: '/static/torrents/',
294 WEBSEED: '/static/webseed/' 303 WEBSEED: '/static/webseed/',
304 AVATARS: '/static/avatars/'
295} 305}
296 306
297// Cache control 307// Cache control
@@ -376,5 +386,6 @@ export {
376 VIDEO_PRIVACIES, 386 VIDEO_PRIVACIES,
377 VIDEO_LICENCES, 387 VIDEO_LICENCES,
378 VIDEO_RATE_TYPES, 388 VIDEO_RATE_TYPES,
379 VIDEO_MIMETYPE_EXT 389 VIDEO_MIMETYPE_EXT,
390 AVATAR_MIMETYPE_EXT
380} 391}