Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #7590: made UploadedFile subclasses' __init__ methods sane.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7817 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9fc4c0aaa4ee145c917a0ece6e6828596e00cce1 1 parent b0a3816
@jacobian jacobian authored
Showing with 15 additions and 5 deletions.
  1. +15 −5 django/core/files/uploadhandler.py
View
20 django/core/files/uploadhandler.py
@@ -140,9 +140,13 @@ def receive_data_chunk(self, raw_data, start):
def file_complete(self, file_size):
self.file.seek(0)
- return TemporaryUploadedFile(self.file, self.file_name,
- self.content_type, file_size,
- self.charset)
+ return TemporaryUploadedFile(
+ file = self.file,
+ file_name = self.file_name,
+ content_type = self.content_type,
+ file_size = file_size,
+ charset = self.charset
+ )
class MemoryFileUploadHandler(FileUploadHandler):
"""
@@ -182,8 +186,14 @@ def file_complete(self, file_size):
if not self.activated:
return
- return InMemoryUploadedFile(self.file, self.field_name, self.file_name,
- self.content_type, self.charset, file_size)
+ return InMemoryUploadedFile(
+ file = self.file,
+ field_name = self.field_name,
+ file_name = self.file_name,
+ content_type = self.content_type,
+ file_size = file_size,
+ charset = self.charset
+ )
class TemporaryFile(object):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.