Skip to content

Commit

Permalink
add configuration for data upload
Browse files Browse the repository at this point in the history
Django allows (1) max memory size of uploads to be set and (2) max number of files to be set. We currently use the default values. See: https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-DATA_UPLOAD_MAX_NUMBER_FILES for more detail.
  • Loading branch information
tompollard committed Jul 3, 2023
1 parent 393e14b commit 39265e4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions physionet-django/physionet/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,3 +623,7 @@ class StorageTypes:

# minimum number of word needed for research_summary field for Credentialing Model.
MIN_WORDS_RESEARCH_SUMMARY_CREDENTIALING = config('MIN_WORDS_RESEARCH_SUMMARY_CREDENTIALING', cast=int, default=20)

# Django configuration for file upload (see https://docs.djangoproject.com/en/4.2/ref/settings/)
DATA_UPLOAD_MAX_NUMBER_FILES = config('DATA_UPLOAD_MAX_NUMBER_FILES', cast=int, default=1000)
DATA_UPLOAD_MAX_MEMORY_SIZE = config('DATA_UPLOAD_MAX_MEMORY_SIZE', cast=int, default=2621440)

0 comments on commit 39265e4

Please sign in to comment.