Skip to content

Commit

Permalink
#636: add Django FILE_UPLOAD_MAX_MEMORY_SIZE and Nginx client_max_bod…
Browse files Browse the repository at this point in the history
…y_size settings as ~ 50MB
  • Loading branch information
Fasand committed Jul 24, 2023
1 parent 5bd14fc commit 1ee778d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Seeder/settings/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@

INTERNAL_IPS = os.environ.get('INTERNAL_IPS', '127.0.0.1').split(' ')

FILE_UPLOAD_MAX_MEMORY_SIZE = int(os.environ.get(
'FILE_UPLOAD_MAX_MEMORY_SIZE', 52428800)) # 50*1024*1024 = 50 MiB

# Database
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
# since we use special PostgresSQL fields we cannot simply use any db.
Expand Down
6 changes: 5 additions & 1 deletion ci/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ server {
location /media/ {
root /seeder;
}
listen 0.0.0.0:80;

# Increase max upload size to ~50MB
client_max_body_size 53M;

listen 0.0.0.0:80;
}

0 comments on commit 1ee778d

Please sign in to comment.