aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/constants.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index e531c4c39..91fbbde75 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -182,6 +182,12 @@ const CONSTRAINTS_FIELDS = {
182 NAME: { min: 3, max: 120 }, // Length 182 NAME: { min: 3, max: 120 }, // Length
183 TRUNCATED_DESCRIPTION: { min: 3, max: 250 }, // Length 183 TRUNCATED_DESCRIPTION: { min: 3, max: 250 }, // Length
184 DESCRIPTION: { min: 3, max: 3000 }, // Length 184 DESCRIPTION: { min: 3, max: 3000 }, // Length
185 IMAGE: {
186 EXTNAME: [ '.jpg', '.jpeg' ],
187 FILE_SIZE: {
188 max: 2 * 1024 * 1024 // 2MB
189 }
190 },
185 EXTNAME: [ '.mp4', '.ogv', '.webm' ], 191 EXTNAME: [ '.mp4', '.ogv', '.webm' ],
186 INFO_HASH: { min: 40, max: 40 }, // Length, info hash is 20 bytes length but we represent it in hexadecimal so 20 * 2 192 INFO_HASH: { min: 40, max: 40 }, // Length, info hash is 20 bytes length but we represent it in hexadecimal so 20 * 2
187 DURATION: { min: 1 }, // Number 193 DURATION: { min: 1 }, // Number
@@ -285,7 +291,7 @@ const VIDEO_MIMETYPE_EXT = {
285 'video/mp4': '.mp4' 291 'video/mp4': '.mp4'
286} 292}
287 293
288const AVATAR_MIMETYPE_EXT = { 294const IMAGE_MIMETYPE_EXT = {
289 'image/png': '.png', 295 'image/png': '.png',
290 'image/jpg': '.jpg', 296 'image/jpg': '.jpg',
291 'image/jpeg': '.jpg' 297 'image/jpeg': '.jpg'
@@ -427,7 +433,7 @@ export {
427 VIDEO_RATE_TYPES, 433 VIDEO_RATE_TYPES,
428 VIDEO_MIMETYPE_EXT, 434 VIDEO_MIMETYPE_EXT,
429 USER_PASSWORD_RESET_LIFETIME, 435 USER_PASSWORD_RESET_LIFETIME,
430 AVATAR_MIMETYPE_EXT, 436 IMAGE_MIMETYPE_EXT,
431 SCHEDULER_INTERVAL, 437 SCHEDULER_INTERVAL,
432 JOB_COMPLETED_LIFETIME 438 JOB_COMPLETED_LIFETIME
433} 439}