aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/initializers/constants.ts8
-rw-r--r--support/nginx/peertube4
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 = {
245 CAPTION_FILE: { 245 CAPTION_FILE: {
246 EXTNAME: [ '.vtt', '.srt' ], 246 EXTNAME: [ '.vtt', '.srt' ],
247 FILE_SIZE: { 247 FILE_SIZE: {
248 max: 2 * 1024 * 1024 // 2MB 248 max: 4 * 1024 * 1024 // 4MB
249 } 249 }
250 } 250 }
251 }, 251 },
@@ -274,7 +274,7 @@ const CONSTRAINTS_FIELDS = {
274 IMAGE: { 274 IMAGE: {
275 EXTNAME: [ '.png', '.jpg', '.jpeg', '.webp' ], 275 EXTNAME: [ '.png', '.jpg', '.jpeg', '.webp' ],
276 FILE_SIZE: { 276 FILE_SIZE: {
277 max: 2 * 1024 * 1024 // 2MB 277 max: 4 * 1024 * 1024 // 4MB
278 } 278 }
279 }, 279 },
280 EXTNAME: [] as string[], 280 EXTNAME: [] as string[],
@@ -296,7 +296,7 @@ const CONSTRAINTS_FIELDS = {
296 IMAGE: { 296 IMAGE: {
297 EXTNAME: [ '.jpg', '.jpeg' ], 297 EXTNAME: [ '.jpg', '.jpeg' ],
298 FILE_SIZE: { 298 FILE_SIZE: {
299 max: 2 * 1024 * 1024 // 2MB 299 max: 4 * 1024 * 1024 // 4MB
300 } 300 }
301 } 301 }
302 }, 302 },
@@ -307,7 +307,7 @@ const CONSTRAINTS_FIELDS = {
307 IMAGE: { 307 IMAGE: {
308 EXTNAME: [ '.png', '.jpeg', '.jpg', '.gif', '.webp' ], 308 EXTNAME: [ '.png', '.jpeg', '.jpg', '.gif', '.webp' ],
309 FILE_SIZE: { 309 FILE_SIZE: {
310 max: 2 * 1024 * 1024 // 2MB 310 max: 4 * 1024 * 1024 // 4MB
311 } 311 }
312 } 312 }
313 }, 313 },
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 {
99 } 99 }
100 100
101 location ~ ^/api/v1/(videos|video-playlists|video-channels|users/me) { 101 location ~ ^/api/v1/(videos|video-playlists|video-channels|users/me) {
102 client_max_body_size 3M; # default is 1M 102 client_max_body_size 6M; # default is 1M
103 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) 103 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)
104 104
105 try_files /dev/null @api; 105 try_files /dev/null @api;
106 } 106 }