Closed sakurai-youhei closed 6 years ago
https://github.com/andrewleech/PyWebDAV3/blob/4ad90df8d9fc9ab45f6092959fd4f88e74092f92/pywebdav/server/fshandler.py#L273
Data should be written without decoding like fp.write(data); Of course, the file should be opened with b option like fp=open(path, "bw+") beforehand.
fp.write(data)
b
fp=open(path, "bw+")
Btw, catching Exception could give better debugging capability.
except Exception as e: log.info('put: Could not create %s, %r', uri, e) raise DAV_Error(424)
https://github.com/andrewleech/PyWebDAV3/blob/4ad90df8d9fc9ab45f6092959fd4f88e74092f92/pywebdav/server/fshandler.py#L273
Data should be written without decoding like
fp.write(data)
; Of course, the file should be opened withb
option likefp=open(path, "bw+")
beforehand.Btw, catching Exception could give better debugging capability.