+# This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
import json
import os
from urllib.parse import quote
os.makedirs(path)
data = []
for f in flist:
- with open(self.get_safe_path(f.name), 'w') as destination:
+ with open(self.get_safe_path(f.name), 'wb') as destination:
for chunk in f.chunks():
destination.write(chunk)
data.append({