From a13df19d578d3c5bf8babfc1864e45fbfda98a47 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 8 Jun 2021 10:01:28 +0200 Subject: Increase max image/caption/torrent upload size --- server/initializers/constants.ts | 8 ++++---- support/nginx/peertube | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 919f9ea6e..d41d0e056 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts @@ -245,7 +245,7 @@ const CONSTRAINTS_FIELDS = { CAPTION_FILE: { EXTNAME: [ '.vtt', '.srt' ], FILE_SIZE: { - max: 2 * 1024 * 1024 // 2MB + max: 4 * 1024 * 1024 // 4MB } } }, @@ -274,7 +274,7 @@ const CONSTRAINTS_FIELDS = { IMAGE: { EXTNAME: [ '.png', '.jpg', '.jpeg', '.webp' ], FILE_SIZE: { - max: 2 * 1024 * 1024 // 2MB + max: 4 * 1024 * 1024 // 4MB } }, EXTNAME: [] as string[], @@ -296,7 +296,7 @@ const CONSTRAINTS_FIELDS = { IMAGE: { EXTNAME: [ '.jpg', '.jpeg' ], FILE_SIZE: { - max: 2 * 1024 * 1024 // 2MB + max: 4 * 1024 * 1024 // 4MB } } }, @@ -307,7 +307,7 @@ const CONSTRAINTS_FIELDS = { IMAGE: { EXTNAME: [ '.png', '.jpeg', '.jpg', '.gif', '.webp' ], FILE_SIZE: { - max: 2 * 1024 * 1024 // 2MB + max: 4 * 1024 * 1024 // 4MB } } }, diff --git a/support/nginx/peertube b/support/nginx/peertube index 7c95c130c..827a57e93 100644 --- a/support/nginx/peertube +++ b/support/nginx/peertube @@ -99,8 +99,8 @@ server { } location ~ ^/api/v1/(videos|video-playlists|video-channels|users/me) { - client_max_body_size 3M; # default is 1M - add_header X-File-Maximum-Size 2M always; # inform backend of the set value in bytes before mime-encoding (x * 1.4 >= client_max_body_size) + client_max_body_size 6M; # default is 1M + add_header X-File-Maximum-Size 4M always; # inform backend of the set value in bytes before mime-encoding (x * 1.4 >= client_max_body_size) try_files /dev/null @api; } -- cgit v1.2.3