1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace OCA\Files;
- use OC\Files\FilenameValidator;
- use OCA\Files\Service\ChunkedUploadConfig;
- use OCP\Capabilities\ICapability;
- class Capabilities implements ICapability {
- public function __construct(
- protected FilenameValidator $filenameValidator,
- ) {
- }
-
- public function getCapabilities(): array {
- return [
- 'files' => [
- '$comment' => '"blacklisted_files" is deprecated as of Nextcloud 30, use "forbidden_filenames" instead',
- 'blacklisted_files' => $this->filenameValidator->getForbiddenFilenames(),
- 'forbidden_filenames' => $this->filenameValidator->getForbiddenFilenames(),
- 'forbidden_filename_basenames' => $this->filenameValidator->getForbiddenBasenames(),
- 'forbidden_filename_characters' => $this->filenameValidator->getForbiddenCharacters(),
- 'forbidden_filename_extensions' => $this->filenameValidator->getForbiddenExtensions(),
- 'bigfilechunking' => true,
- 'chunked_upload' => [
- 'max_size' => ChunkedUploadConfig::getMaxChunkSize(),
- 'max_parallel_count' => ChunkedUploadConfig::getMaxParallelCount(),
- ],
- ],
- ];
- }
- }
|