Ticket #9632: chunks.diff
File chunks.diff, 727 bytes (added by , 16 years ago) |
---|
-
django/core/files/base.py
68 68 69 69 if hasattr(self, 'seek'): 70 70 self.seek(0) 71 # Assume the pointer is at zero... 72 counter = self.size 71 72 chunk = self.read(chunk_size) 73 while len(chunk) > 0: 74 yield chunk 75 chunk = self.read(chunk_size) 73 76 74 while counter > 0:75 yield self.read(chunk_size)76 counter -= chunk_size77 78 77 def multiple_chunks(self, chunk_size=None): 79 78 """ 80 79 Returns ``True`` if you can expect multiple chunks.