Ticket #7683: 7683.2.diff

File 7683.2.diff, 698 bytes (added by andrewsk, 7 years ago)

Close method on the NamedTemporaryFile removes temporary file before it can be moved somewhere.

  • django/core/files/uploadedfile.py

    201201    def read(self, *args):          return self._file.read(*args)
    202202    def seek(self, offset):         return self._file.seek(offset)
    203203    def write(self, s):             return self._file.write(s)
    204     def close(self):                return self._file.close()
    205204    def __iter__(self):             return iter(self._file)
    206205    def readlines(self, size=None): return self._file.readlines(size)
    207206    def xreadlines(self):           return self._file.xreadlines()
Back to Top