WebDAV
It is convinient to make LFSS WebDAV compatible, because they both use HTTP GET, PUT, DELETE methods to interact with files.
However, WebDAV utilize more HTTP methods, which are disabled by default in LFSS, because they may not be supported by many middlewares or clients.
The WebDAV support can be enabled by setting the LFSS_WEBDAV environment variable to 1. i.e.
sh
LFSS_WEBDAV=1 lfss-servePlease note:
- WebDAV support is experimental, and is currently not well-tested.
- LFSS not allow creating files in the root directory, however some client such as Finder will try to create files in the root directory. Thus, it is safer to mount the user directory only, e.g.
http://localhost:8000/<username>/. - LFSS not allow directory creation, instead it creates directoy implicitly when a file is uploaded to a non-exist directory. i.e.
PUT http://localhost:8000/<username>/dir/file.txtwill create thedirdirectory if it does not exist. However, the WebDAVMKCOLmethod requires the directory to be created explicitly, so WebDAVMKCOLmethod instead create a decoy file on the path (.lfss_keep), and hide the file from the file listing byPROPFINDmethod. This leads to:- You may see a
.lfss_keepfile in the directory with native file listing (e.g./_api/list-files), but it is hidden in WebDAV clients. - The directory may be deleted if there is no file in it and the
.lfss_keepfile is not created by WebDAV client.
- You may see a