]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Increase max image/caption/torrent upload size
authorChocobozzz <me@florianbigard.com>
Tue, 8 Jun 2021 08:01:28 +0000 (10:01 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 8 Jun 2021 08:01:50 +0000 (10:01 +0200)
server/initializers/constants.ts
support/nginx/peertube

index 919f9ea6e35c764efd2ad2f925b8540bcd18cc3c..d41d0e0565f2db253f8f4ecbfc4f5c405582c57c 100644 (file)
@@ -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
       }
     }
   },
index 7c95c130c2f46fe5496c7be37e073363f60e1c29..827a57e9359ab534c7ceafb87fda631bd16b4851 100644 (file)
@@ -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;
   }