From f76f832307f93b40222c848e131c62dc84ebc8e7 Mon Sep 17 00:00:00 2001 From: augushong Date: Thu, 20 Aug 2026 22:13:15 +0800 Subject: [PATCH] =?UTF-8?q?feat(storage):=20=E6=96=B0=E5=A2=9EWebDAV?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E9=A9=B1=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/think/filesystem/driver/Webdav.php | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 extend/think/filesystem/driver/Webdav.php diff --git a/extend/think/filesystem/driver/Webdav.php b/extend/think/filesystem/driver/Webdav.php new file mode 100644 index 0000000..0a0cf00 --- /dev/null +++ b/extend/think/filesystem/driver/Webdav.php @@ -0,0 +1,27 @@ + sysconfig('upload', 'webdav_url'), + 'userName' => sysconfig('upload', 'webdav_username'), + 'password' => sysconfig('upload', 'webdav_password'), + ]); + + return new WebDAVAdapter($client, sysconfig('upload', 'webdav_prefix', '')); + } + + public function url(string $path): string + { + return $this->concatPathToUrl(sysconfig('upload', 'webdav_domain'), $path); + } +}