+# -*- coding: utf-8 -*-
+#
+# This file is part of MIL/PEER, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
from __future__ import unicode_literals
-import os
-from django.core.files.base import ContentFile, File
+from django.core.files.base import ContentFile
from django.core.files.storage import FileSystemStorage
try:
content = ContentFile(compress(content.read()))
return super(GzipFileSystemStorage, self)._save(name, content)
- def get_available_name(self, name):
+ def get_available_name(self, name, max_length=None):
if self.exists(name):
self.delete(name)
- return name
\ No newline at end of file
+ return name