beremiz

Runtime: Fix web settings file upload.

2023-05-17, Edouard Tisserant
ef65e5b07464
Parents b3394107eb8b
Children 5a66d4be2e49
Runtime: Fix web settings file upload.
--- 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)