Skip to content

Commit 627b240

Browse files
authored
Merge pull request #113 from Xpirix/rpc_payload_too_large_error
Handle Base64 size for the RPC2 enpoint
2 parents 5de0f84 + 48f351f commit 627b240

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

dockerize/sites-enabled/prod-ssl.conf

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ server {
1818

1919
access_log /var/log/nginx/access.log;
2020

21-
client_max_body_size 30M;
21+
# Set the maximum body size to 25MB
22+
# When changing this, make sure to also change the
23+
# corresponding value in the PLUGIN_MAX_UPLOAD_SIZE in
24+
# the settings_docker.py file, prod-ssl.conf and staging-ssl.conf
25+
# files.
26+
client_max_body_size 25M;
2227
error_log /var/log/nginx/error.log;
2328

2429
# the port your site will be served on
@@ -152,7 +157,12 @@ server {
152157

153158
access_log /var/log/nginx/access.log;
154159

155-
client_max_body_size 30M;
160+
# Set the maximum body size to 25MB
161+
# When changing this, make sure to also change the
162+
# corresponding value in the PLUGIN_MAX_UPLOAD_SIZE in
163+
# the settings_docker.py file, prod-ssl.conf and staging-ssl.conf
164+
# files.
165+
client_max_body_size 25M;
156166
error_log /var/log/nginx/error.log;
157167

158168
charset utf-8;

dockerize/sites-enabled/prod.conf

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ server {
1818

1919
access_log /var/log/nginx/access.log;
2020

21-
client_max_body_size 30M;
21+
# Set the maximum body size to 25MB
22+
# When changing this, make sure to also change the
23+
# corresponding value in the PLUGIN_MAX_UPLOAD_SIZE in
24+
# the settings_docker.py file, prod-ssl.conf and staging-ssl.conf
25+
# files.
26+
client_max_body_size 25M;
2227
error_log /var/log/nginx/error.log;
2328

2429
# the port your site will be served on

dockerize/sites-enabled/staging-ssl.conf

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ server {
1717
gzip_disable “MSIE [1-6].(?!.*SV1)”;
1818

1919
access_log /var/log/nginx/access.log;
20-
21-
client_max_body_size 30M;
20+
21+
# Set the maximum body size to 25MB
22+
# When changing this, make sure to also change the
23+
# corresponding value in the PLUGIN_MAX_UPLOAD_SIZE in
24+
# the settings_docker.py file, prod-ssl.conf and staging-ssl.conf
25+
# files.
26+
client_max_body_size 25M;
2227
error_log /var/log/nginx/error.log;
2328

2429
# the port your site will be served on
@@ -152,7 +157,13 @@ server {
152157

153158
access_log /var/log/nginx/access.log;
154159

155-
client_max_body_size 30M;
160+
# Set the maximum body size to 25MB
161+
# When changing this, make sure to also change the
162+
# corresponding value in the PLUGIN_MAX_UPLOAD_SIZE in
163+
# the settings_docker.py file, prod-ssl.conf and staging-ssl.conf
164+
# files.
165+
client_max_body_size 25M;
166+
156167
error_log /var/log/nginx/error.log;
157168

158169
charset utf-8;

qgis-app/settings_docker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,12 @@
169169
# Default primary key type
170170
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
171171

172+
173+
# Set the maximum PLUGIN_MAX_UPLOAD_SIZE size to 25MB
174+
# When changing this, make sure to also change the
175+
# corresponding value in the "client_max_body_size" in
176+
# the prod-ssl.conf and staging-ssl.conf
177+
# files.
172178
PLUGIN_MAX_UPLOAD_SIZE = os.environ.get("PLUGIN_MAX_UPLOAD_SIZE", 25000000) # Default is 25MB
173179

174180
# RPC2 Max upload size

0 commit comments

Comments
 (0)