Add bulkupload.enabled configuration switch

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/33697/head
Côme Chilliet 2 years ago
parent be7082efff
commit 5ae185a8b1
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
  1. 16
      apps/dav/lib/Capabilities.php
  2. 7
      config/config.sample.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;
}
}

@ -2238,4 +2238,11 @@ $CONFIG = [
* Defaults to ``false``
*/
'projects.enabled' => false,
/**
* Enable the bulk upload feature.
*
* Defaults to ``false``
*/
'bulkupload.enabled' => false,
];

Loading…
Cancel
Save