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.ts20
1 files changed, 14 insertions, 6 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 3f934688b..1e74f3eab 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -305,7 +305,7 @@ const CONSTRAINTS_FIELDS = {
305 PUBLIC_KEY: { min: 10, max: 5000 }, // Length 305 PUBLIC_KEY: { min: 10, max: 5000 }, // Length
306 PRIVATE_KEY: { min: 10, max: 5000 }, // Length 306 PRIVATE_KEY: { min: 10, max: 5000 }, // Length
307 URL: { min: 3, max: 2000 }, // Length 307 URL: { min: 3, max: 2000 }, // Length
308 AVATAR: { 308 IMAGE: {
309 EXTNAME: [ '.png', '.jpeg', '.jpg', '.gif', '.webp' ], 309 EXTNAME: [ '.png', '.jpeg', '.jpg', '.gif', '.webp' ],
310 FILE_SIZE: { 310 FILE_SIZE: {
311 max: 2 * 1024 * 1024 // 2MB 311 max: 2 * 1024 * 1024 // 2MB
@@ -466,6 +466,8 @@ const MIMETYPES = {
466 IMAGE: { 466 IMAGE: {
467 MIMETYPE_EXT: { 467 MIMETYPE_EXT: {
468 'image/png': '.png', 468 'image/png': '.png',
469 'image/gif': '.gif',
470 'image/webp': '.webp',
469 'image/jpg': '.jpg', 471 'image/jpg': '.jpg',
470 'image/jpeg': '.jpg' 472 'image/jpeg': '.jpg'
471 }, 473 },
@@ -605,9 +607,15 @@ const PREVIEWS_SIZE = {
605 height: 480, 607 height: 480,
606 minWidth: 400 608 minWidth: 400
607} 609}
608const AVATARS_SIZE = { 610const ACTOR_IMAGES_SIZE = {
609 width: 120, 611 AVATARS: {
610 height: 120 612 width: 120,
613 height: 120
614 },
615 BANNERS: {
616 width: 1920,
617 height: 384
618 }
611} 619}
612 620
613const EMBED_SIZE = { 621const EMBED_SIZE = {
@@ -755,7 +763,7 @@ if (isTestInstance() === true) {
755 ACTIVITY_PUB.VIDEO_REFRESH_INTERVAL = 10 * 1000 // 10 seconds 763 ACTIVITY_PUB.VIDEO_REFRESH_INTERVAL = 10 * 1000 // 10 seconds
756 ACTIVITY_PUB.VIDEO_PLAYLIST_REFRESH_INTERVAL = 10 * 1000 // 10 seconds 764 ACTIVITY_PUB.VIDEO_PLAYLIST_REFRESH_INTERVAL = 10 * 1000 // 10 seconds
757 765
758 CONSTRAINTS_FIELDS.ACTORS.AVATAR.FILE_SIZE.max = 100 * 1024 // 100KB 766 CONSTRAINTS_FIELDS.ACTORS.IMAGE.FILE_SIZE.max = 100 * 1024 // 100KB
759 CONSTRAINTS_FIELDS.VIDEOS.IMAGE.FILE_SIZE.max = 400 * 1024 // 400KB 767 CONSTRAINTS_FIELDS.VIDEOS.IMAGE.FILE_SIZE.max = 400 * 1024 // 400KB
760 768
761 SCHEDULER_INTERVALS_MS.actorFollowScores = 1000 769 SCHEDULER_INTERVALS_MS.actorFollowScores = 1000
@@ -816,7 +824,7 @@ export {
816 SEARCH_INDEX, 824 SEARCH_INDEX,
817 HLS_REDUNDANCY_DIRECTORY, 825 HLS_REDUNDANCY_DIRECTORY,
818 P2P_MEDIA_LOADER_PEER_VERSION, 826 P2P_MEDIA_LOADER_PEER_VERSION,
819 AVATARS_SIZE, 827 ACTOR_IMAGES_SIZE,
820 ACCEPT_HEADERS, 828 ACCEPT_HEADERS,
821 BCRYPT_SALT_SIZE, 829 BCRYPT_SALT_SIZE,
822 TRACKER_RATE_LIMITS, 830 TRACKER_RATE_LIMITS,