Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Increase max image/caption/torrent upload size

Chocobozzza13df19d578d
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 919f9ea6e3..d41d0e0565 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 7c95c130c2..827a57e935 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;
}