Ticket #7900: file_upload_tell.2.diff

File file_upload_tell.2.diff, 914 bytes (added by magneto, 16 years ago)

add the tell method (last diff forgot a 'return')

  • 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 tell(self):                 return self._file.tell()
    204205    def close(self):                return self._file.close()
    205206    def __iter__(self):             return iter(self._file)
    206207    def readlines(self, size=None): return self._file.readlines(size)
     
    221222
    222223    def open(self):
    223224        self.seek(0)
     225       
     226    def tell(self):
     227        return self.file.tell()
    224228
    225229    def read(self, *args, **kwargs):
    226230        return self.file.read(*args, **kwargs)
Back to Top