sigoden / dufs

A file server that supports static serving, uploading, searching, accessing control, webdav...
Other
5.45k stars 259 forks source link

Please allow creating files by POST method. Sometimes it is impossible to use the PUT method #404

Closed benziout closed 4 weeks ago

benziout commented 4 weeks ago

Please allow creating files by POST method. Sometimes it is impossible to use the PUT method

             ## REQUEST

POST http://192.168.1.10/file.txt HTTP/1.1 Content-Length: 5 Host: 192.168.1.10

Hello

             ## ERROR RESPONSE

HTTP/1.1 405 Method Not Allowed access-control-allow-origin: access-control-allow-credentials: true access-control-allow-methods: access-control-allow-headers: Authorization, access-control-expose-headers: Authorization, content-length: 0 date: ...

sigoden commented 4 weeks ago

we will not support this feature. Because POST does not conform to the webdav specification,

If it is impossible to use the PUT method, you should avoid use dufs api.