Kaydet (Commit) e17776e2 authored tarafından Sergey Fedoseev's avatar Sergey Fedoseev Kaydeden (comit) Tim Graham

Removed redundant UploadedFile.DEFAULT_CHUNK_SIZE.

The same value is inherited from File.
üst a5406fe9
...@@ -48,7 +48,7 @@ class File(FileProxyMixin): ...@@ -48,7 +48,7 @@ class File(FileProxyMixin):
def chunks(self, chunk_size=None): def chunks(self, chunk_size=None):
""" """
Read the file and yield chunks of ``chunk_size`` bytes (defaults to Read the file and yield chunks of ``chunk_size`` bytes (defaults to
``UploadedFile.DEFAULT_CHUNK_SIZE``). ``File.DEFAULT_CHUNK_SIZE``).
""" """
chunk_size = chunk_size or self.DEFAULT_CHUNK_SIZE chunk_size = chunk_size or self.DEFAULT_CHUNK_SIZE
try: try:
......
...@@ -21,7 +21,6 @@ class UploadedFile(File): ...@@ -21,7 +21,6 @@ class UploadedFile(File):
An ``UploadedFile`` object behaves somewhat like a file object and An ``UploadedFile`` object behaves somewhat like a file object and
represents some file data that the user submitted with a form. represents some file data that the user submitted with a form.
""" """
DEFAULT_CHUNK_SIZE = 64 * 2 ** 10
def __init__(self, file=None, name=None, content_type=None, size=None, charset=None, content_type_extra=None): def __init__(self, file=None, name=None, content_type=None, size=None, charset=None, content_type_extra=None):
super().__init__(file, name) super().__init__(file, name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment