Runtime: Fix web settings file upload.
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Wed, 17 May 2023 17:13:39 +0200
changeset 3804 ef65e5b07464
parent 3803 b3394107eb8b
child 3805 5a66d4be2e49
Runtime: Fix web settings file upload.
runtime/NevowServer.py
--- a/runtime/NevowServer.py	Wed May 17 17:13:01 2023 +0200
+++ b/runtime/NevowServer.py	Wed May 17 17:13:39 2023 +0200
@@ -237,7 +237,7 @@
         if uploadedfile is not None:
             fobj = getattr(uploadedfile, "file", None)
         if fobj is not None:
-            with open(uploadedfile.filename, 'w') as destfd:
+            with open(uploadedfile.filename, 'wb') as destfd:
                 fobj.seek(0)
                 shutil.copyfileobj(fobj,destfd)