diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-08-25 14:47:25 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-08-25 14:47:50 +0200 |
commit | 5ae185a8b1427a5daa7bb98499482d4c33f6be29 (patch) | |
tree | c4bd6e737c23ce884b266f984148ea22025416b2 /apps/dav | |
parent | be7082efffff075671077e484abf8a76bfa9c3f8 (diff) | |
download | nextcloud-server-5ae185a8b1427a5daa7bb98499482d4c33f6be29.tar.gz nextcloud-server-5ae185a8b1427a5daa7bb98499482d4c33f6be29.zip |
Add bulkupload.enabled configuration switch
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Capabilities.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/dav/lib/Capabilities.php b/apps/dav/lib/Capabilities.php index 41d1b983587..fd500ee8012 100644 --- a/apps/dav/lib/Capabilities.php +++ b/apps/dav/lib/Capabilities.php @@ -4,6 +4,7 @@ * * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Louis Chemineau <louis@chmn.me> + * @author Côme Chilliet <come.chilliet@nextcloud.com> * * @license AGPL-3.0 * @@ -23,15 +24,24 @@ namespace OCA\DAV; use OCP\Capabilities\ICapability; +use OCP\IConfig; class Capabilities implements ICapability { + private IConfig $config; + + public function __construct(IConfig $config) { + $this->config = $config; + } + public function getCapabilities() { - return [ + $capabilities = [ 'dav' => [ 'chunking' => '1.0', - // disabled because of https://github.com/nextcloud/desktop/issues/4243 - // 'bulkupload' => '1.0', ] ]; + if ($this->config->getSystemValueBool('bulkupload.enabled', false)) { + $capabilities['dav']['bulkupload'] = '1.0'; + } + return $capabilities; } } |