Mayan-EDMS uncompresses ZipFile archives and then loads the files directly. This causes an UnsupportedOperation error when Django tries to calculate the file size using seek() and tell(). The ZipExtFile instance that is passed to Django has a seek() method, but calling it raises UnsupportedOperation.
We need to fallback to calculating size and reading the content without using seek().
Mayan-EDMS uncompresses ZipFile archives and then loads the files directly. This causes an
UnsupportedOperation
error when Django tries to calculate the file size usingseek()
andtell()
. TheZipExtFile
instance that is passed to Django has aseek()
method, but calling it raisesUnsupportedOperation
.We need to fallback to calculating size and reading the content without using
seek()
.