aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-08 10:01:28 +0200
committerChocobozzz <me@florianbigard.com>2021-06-08 10:01:50 +0200
commita13df19d578d3c5bf8babfc1864e45fbfda98a47 (patch)
tree52d464a0c83acce86dcd023c23b6fd0d90dc70ec
parentea54cd04c1ff0e55651cd5fb1a83672acde68604 (diff)
downloadPeerTube-a13df19d578d3c5bf8babfc1864e45fbfda98a47.tar.gz
PeerTube-a13df19d578d3c5bf8babfc1864e45fbfda98a47.tar.zst
PeerTube-a13df19d578d3c5bf8babfc1864e45fbfda98a47.zip
Increase max image/caption/torrent upload size
-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 }