-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Improve bulk upload and add a config switch for it #33697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
be7082e
5ae185a
e34f2c4
b3cd9b5
d90b314
9874557
7f80dcc
4f3b323
30bfd5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| * @copyright Copyright (c) 2021, Louis Chemineau <[email protected]> | ||
| * | ||
| * @author Louis Chemineau <[email protected]> | ||
| * @author Côme Chilliet <[email protected]> | ||
| * | ||
| * @license AGPL-3.0 | ||
| * | ||
|
|
@@ -95,6 +96,8 @@ public function httpPost(RequestInterface $request, ResponseInterface $response) | |
| $writtenFiles[$headers['x-file-path']] = [ | ||
| "error" => false, | ||
| "etag" => $node->getETag(), | ||
| "fileid" => $node->getId(), | ||
| "permissions" => $node->getPermissions(), | ||
come-nc marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ]; | ||
| } catch (\Exception $e) { | ||
| $this->logger->error($e->getMessage(), ['path' => $headers['x-file-path']]); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| * | ||
| * @author Thomas Müller <[email protected]> | ||
| * @author Louis Chemineau <[email protected]> | ||
| * @author Côme Chilliet <[email protected]> | ||
| * | ||
| * @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; | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.