diff options
Diffstat (limited to 'django/core/files/uploadhandler.py')
-rw-r--r-- | django/core/files/uploadhandler.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/django/core/files/uploadhandler.py b/django/core/files/uploadhandler.py index a0f34b741c..ddfb7e0116 100644 --- a/django/core/files/uploadhandler.py +++ b/django/core/files/uploadhandler.py @@ -160,10 +160,7 @@ class MemoryFileUploadHandler(FileUploadHandler): """ # Check the content-length header to see if we should # If the post is too large, we cannot use the Memory handler. - if content_length > settings.FILE_UPLOAD_MAX_MEMORY_SIZE: - self.activated = False - else: - self.activated = True + self.activated = content_length <= settings.FILE_UPLOAD_MAX_MEMORY_SIZE def new_file(self, *args, **kwargs): super().new_file(*args, **kwargs) |