1👍
I’ve solved the issue by using this post (but didn’t find any cause of it):
- add
django.middleware.gzip.GZipMiddleware
middleware toMIDDLEWARE
project settings variable. - write a subclass for my existing FileWrapper (code below).
FixedFileWrapper:
class FixedFileWrapper(FileWrapper):
def __iter__(self):
self.filelike.seek(0)
return self
Maybe, someone can explain me the reason my issue?
Source:stackexchange.com