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.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 243d544ea..cf7cd3d74 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -273,6 +273,12 @@ const CONSTRAINTS_FIELDS = {
273 VIDEO_IMPORTS: { 273 VIDEO_IMPORTS: {
274 URL: { min: 3, max: 2000 }, // Length 274 URL: { min: 3, max: 2000 }, // Length
275 TORRENT_NAME: { min: 3, max: 255 }, // Length 275 TORRENT_NAME: { min: 3, max: 255 }, // Length
276 TORRENT_FILE: {
277 EXTNAME: [ '.torrent' ],
278 FILE_SIZE: {
279 max: 1024 * 200 // 200 KB
280 }
281 }
276 }, 282 },
277 VIDEOS: { 283 VIDEOS: {
278 NAME: { min: 3, max: 120 }, // Length 284 NAME: { min: 3, max: 120 }, // Length
@@ -417,6 +423,10 @@ const VIDEO_CAPTIONS_MIMETYPE_EXT = {
417 'application/x-subrip': '.srt' 423 'application/x-subrip': '.srt'
418} 424}
419 425
426const TORRENT_MIMETYPE_EXT = {
427 'application/x-bittorrent': '.torrent'
428}
429
420// --------------------------------------------------------------------------- 430// ---------------------------------------------------------------------------
421 431
422const SERVER_ACTOR_NAME = 'peertube' 432const SERVER_ACTOR_NAME = 'peertube'
@@ -596,6 +606,7 @@ export {
596 FEEDS, 606 FEEDS,
597 JOB_TTL, 607 JOB_TTL,
598 NSFW_POLICY_TYPES, 608 NSFW_POLICY_TYPES,
609 TORRENT_MIMETYPE_EXT,
599 STATIC_MAX_AGE, 610 STATIC_MAX_AGE,
600 STATIC_PATHS, 611 STATIC_PATHS,
601 ACTIVITY_PUB, 612 ACTIVITY_PUB,