I am working with Django 2.2 and got stuck with file upload size validation. I have read django documentation:
DATA_UPLOAD_MAX_MEMORY_SIZE
FILE_UPLOAD_MAX_MEMORY_SIZE
I only set DATA_UPLOAD_MAX_MEMORY (to 20 MB), as mentioned in documentation:
The check is done when accessing request.body or request.POST and is calculated against the total request size excluding any file upload data.
But in my project it also checks my uploading file size in request.FILES.
Can someone explain differences between FILE_UPLOAD_MAX_MEMORY and DATA_UPLOAD_MAX_MEMORY? And how to use them properly?