kimetrica / django-binary-database-files

A storage system for Django that stores uploaded files in the database.
Other
11 stars 19 forks source link

UnsupportedOperation using ZipExtFile #3

Open rhunwicks opened 5 years ago

rhunwicks commented 5 years ago

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().

jsonn commented 4 years ago

This was fixed by ff15abce41e55e8e7a9bf3c883f710ff7f0a4668?