Ticket #7594: file_upload_in_memory_fix.diff

File file_upload_in_memory_fix.diff, 695 bytes (added by Bastian Kleineidam <calvin@…>, 7 years ago)
  • django/core/files/uploadedfile.py

    diff --git a/django/core/files/uploadedfile.py b/django/core/files/uploadedfile.py
    index 51cec17..922a374 100644
    a b class InMemoryUploadedFile(UploadedFile): 
    140135    A file uploaded into memory (i.e. stream-to-memory).
    141136    """
    142137    def __init__(self, file, field_name, file_name, content_type, charset, file_size):
    143         super(InMemoryUploadedFile, self).__init__(file_name, content_type, charset, file_size)
     138        super(InMemoryUploadedFile, self).__init__(file_name, content_type, file_size, charset)
    144139        self.file = file
    145140        self.field_name = field_name
    146141        self.file.seek(0)
Back to Top