X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/040285e94b385dd57a003a4fe5b693c299fe921b..30423c0a921a37cc2213e83309d5abe04399ba15:/src/fileupload/views.py diff --git a/src/fileupload/views.py b/src/fileupload/views.py index 3e6b999e..eb7959c3 100644 --- a/src/fileupload/views.py +++ b/src/fileupload/views.py @@ -129,7 +129,7 @@ class UploadView(FormView): 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({