diff --git a/.htaccess b/.htaccess index 7a8f41886aca9..1c1798bb9d9a2 100644 --- a/.htaccess +++ b/.htaccess @@ -95,3 +95,7 @@ AddDefaultCharset utf-8 Options -Indexes +#### DO NOT CHANGE ANYTHING ABOVE THIS LINE #### + +ErrorDocument 403 /index.php/error/403 +ErrorDocument 404 /index.php/error/404 diff --git a/apps/files_external/lib/Controller/GlobalStoragesController.php b/apps/files_external/lib/Controller/GlobalStoragesController.php index 2630fcc365a33..a6dcc19656a16 100644 --- a/apps/files_external/lib/Controller/GlobalStoragesController.php +++ b/apps/files_external/lib/Controller/GlobalStoragesController.php @@ -34,9 +34,9 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IUserSession; +use Psr\Log\LoggerInterface; /** * Global storages controller @@ -49,7 +49,7 @@ class GlobalStoragesController extends StoragesController { * @param IRequest $request request object * @param IL10N $l10n l10n service * @param GlobalStoragesService $globalStoragesService storage service - * @param ILogger $logger + * @param LoggerInterface $logger * @param IUserSession $userSession * @param IGroupManager $groupManager * @param IConfig $config @@ -59,7 +59,7 @@ public function __construct( IRequest $request, IL10N $l10n, GlobalStoragesService $globalStoragesService, - ILogger $logger, + LoggerInterface $logger, IUserSession $userSession, IGroupManager $groupManager, IConfig $config diff --git a/apps/files_external/lib/Controller/StoragesController.php b/apps/files_external/lib/Controller/StoragesController.php index c8eda8658eff9..aafc5ac388a34 100644 --- a/apps/files_external/lib/Controller/StoragesController.php +++ b/apps/files_external/lib/Controller/StoragesController.php @@ -42,49 +42,14 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IUserSession; +use Psr\Log\LoggerInterface; /** * Base class for storages controllers */ abstract class StoragesController extends Controller { - - /** - * L10N service - * - * @var IL10N - */ - protected $l10n; - - /** - * Storages service - * - * @var StoragesService - */ - protected $service; - - /** - * @var ILogger - */ - protected $logger; - - /** - * @var IUserSession - */ - protected $userSession; - - /** - * @var IGroupManager - */ - protected $groupManager; - - /** - * @var IConfig - */ - protected $config; - /** * Creates a new storages controller. * @@ -92,25 +57,19 @@ abstract class StoragesController extends Controller { * @param IRequest $request request object * @param IL10N $l10n l10n service * @param StoragesService $storagesService storage service - * @param ILogger $logger + * @param LoggerInterface $logger */ public function __construct( $AppName, IRequest $request, - IL10N $l10n, - StoragesService $storagesService, - ILogger $logger, - IUserSession $userSession, - IGroupManager $groupManager, - IConfig $config + protected IL10N $l10n, + protected StoragesService $service, + protected LoggerInterface $logger, + protected IUserSession $userSession, + protected IGroupManager $groupManager, + protected IConfig $config ) { parent::__construct($AppName, $request); - $this->l10n = $l10n; - $this->service = $storagesService; - $this->logger = $logger; - $this->userSession = $userSession; - $this->groupManager = $groupManager; - $this->config = $config; } /** @@ -159,7 +118,7 @@ protected function createStorage( $priority ); } catch (\InvalidArgumentException $e) { - $this->logger->logException($e); + $this->logger->error($e->getMessage(), ['exception' => $e]); return new DataResponse( [ 'message' => $this->l10n->t('Invalid backend or authentication mechanism class') diff --git a/apps/files_external/lib/Controller/UserGlobalStoragesController.php b/apps/files_external/lib/Controller/UserGlobalStoragesController.php index 74424bce006ca..91bc170137276 100644 --- a/apps/files_external/lib/Controller/UserGlobalStoragesController.php +++ b/apps/files_external/lib/Controller/UserGlobalStoragesController.php @@ -39,9 +39,9 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IUserSession; +use Psr\Log\LoggerInterface; /** * User global storages controller @@ -54,7 +54,7 @@ class UserGlobalStoragesController extends StoragesController { * @param IRequest $request request object * @param IL10N $l10n l10n service * @param UserGlobalStoragesService $userGlobalStoragesService storage service - * @param ILogger $logger + * @param LoggerInterface $logger * @param IUserSession $userSession * @param IGroupManager $groupManager */ @@ -63,7 +63,7 @@ public function __construct( IRequest $request, IL10N $l10n, UserGlobalStoragesService $userGlobalStoragesService, - ILogger $logger, + LoggerInterface $logger, IUserSession $userSession, IGroupManager $groupManager, IConfig $config diff --git a/apps/files_external/lib/Controller/UserStoragesController.php b/apps/files_external/lib/Controller/UserStoragesController.php index c0a460fd8e316..a875f7c2dcb40 100644 --- a/apps/files_external/lib/Controller/UserStoragesController.php +++ b/apps/files_external/lib/Controller/UserStoragesController.php @@ -38,9 +38,9 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IUserSession; +use Psr\Log\LoggerInterface; /** * User storages controller @@ -53,7 +53,7 @@ class UserStoragesController extends StoragesController { * @param IRequest $request request object * @param IL10N $l10n l10n service * @param UserStoragesService $userStoragesService storage service - * @param ILogger $logger + * @param LoggerInterface $logger * @param IUserSession $userSession * @param IGroupManager $groupManager */ @@ -62,7 +62,7 @@ public function __construct( IRequest $request, IL10N $l10n, UserStoragesService $userStoragesService, - ILogger $logger, + LoggerInterface $logger, IUserSession $userSession, IGroupManager $groupManager, IConfig $config diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php index 623388048e780..72b97f5a42fd0 100644 --- a/apps/files_external/lib/Lib/Storage/FTP.php +++ b/apps/files_external/lib/Lib/Storage/FTP.php @@ -29,6 +29,7 @@ use OCP\Constants; use OCP\Files\FileInfo; use OCP\Files\StorageNotAvailableException; +use Psr\Log\LoggerInterface; class FTP extends Common { use CopyDirectory; @@ -116,7 +117,7 @@ public function filemtime($path) { if ($this->is_dir($path)) { $list = $this->getConnection()->mlsd($this->buildPath($path)); if (!$list) { - \OC::$server->getLogger()->warning("Unable to get last modified date for ftp folder ($path), failed to list folder contents"); + \OC::$server->get(LoggerInterface::class)->warning("Unable to get last modified date for ftp folder ($path), failed to list folder contents"); return time(); } $currentDir = current(array_filter($list, function ($item) { @@ -130,7 +131,7 @@ public function filemtime($path) { } return $time->getTimestamp(); } else { - \OC::$server->getLogger()->warning("Unable to get last modified date for ftp folder ($path), folder contents doesn't include current folder"); + \OC::$server->get(LoggerInterface::class)->warning("Unable to get last modified date for ftp folder ($path), folder contents doesn't include current folder"); return time(); } } else { diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 66319d66770ef..26218dc729a35 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -54,10 +54,10 @@ use Icewind\SMB\System; use Icewind\Streams\CallbackWrapper; use Icewind\Streams\IteratorDirectory; -use OCP\Cache\CappedMemoryCache; use OC\Files\Filesystem; use OC\Files\Storage\Common; use OCA\Files_External\Lib\Notify\SMBNotifyHandler; +use OCP\Cache\CappedMemoryCache; use OCP\Constants; use OCP\Files\EntityTooLargeException; use OCP\Files\Notify\IChange; @@ -66,7 +66,7 @@ use OCP\Files\Storage\INotifyStorage; use OCP\Files\StorageAuthException; use OCP\Files\StorageNotAvailableException; -use OCP\ILogger; +use Psr\Log\LoggerInterface; class SMB extends Common implements INotifyStorage { /** @@ -87,7 +87,7 @@ class SMB extends Common implements INotifyStorage { /** @var CappedMemoryCache */ protected CappedMemoryCache $statCache; - /** @var ILogger */ + /** @var LoggerInterface */ protected $logger; /** @var bool */ @@ -113,7 +113,7 @@ public function __construct($params) { if (isset($params['logger'])) { $this->logger = $params['logger']; } else { - $this->logger = \OC::$server->getLogger(); + $this->logger = \OC::$server->get(LoggerInterface::class); } $options = new Options(); @@ -212,7 +212,7 @@ protected function getFileInfo($path) { * @throws StorageAuthException */ protected function throwUnavailable(\Exception $e) { - $this->logger->logException($e, ['message' => 'Error while getting file info']); + $this->logger->error('Error while getting file info', ['exception' => $e]); throw new StorageAuthException($e->getMessage(), $e); } @@ -277,13 +277,13 @@ protected function getFolderContents($path): iterable { yield $file; } } catch (ForbiddenException $e) { - $this->logger->logException($e, ['level' => ILogger::DEBUG, 'message' => 'Hiding forbidden entry ' . $file->getName()]); + $this->logger->debug($e->getMessage(), ['exception' => $e]); } catch (NotFoundException $e) { - $this->logger->logException($e, ['level' => ILogger::DEBUG, 'message' => 'Hiding not found entry ' . $file->getName()]); + $this->logger->debug('Hiding forbidden entry ' . $file->getName(), ['exception' => $e]); } } } catch (ConnectException $e) { - $this->logger->logException($e, ['message' => 'Error while getting folder content']); + $this->logger->error('Error while getting folder content', ['exception' => $e]); throw new StorageNotAvailableException($e->getMessage(), (int)$e->getCode(), $e); } catch (NotFoundException $e) { throw new \OCP\Files\NotFoundException($e->getMessage(), 0, $e); @@ -328,7 +328,7 @@ public function rename($source, $target, $retry = true): bool { $this->remove($target); $result = $this->share->rename($absoluteSource, $absoluteTarget); } else { - $this->logger->logException($e, ['level' => ILogger::WARN]); + $this->logger->warning($e->getMessage(), ['exception' => $e]); return false; } } catch (InvalidArgumentException $e) { @@ -336,11 +336,11 @@ public function rename($source, $target, $retry = true): bool { $this->remove($target); $result = $this->share->rename($absoluteSource, $absoluteTarget); } else { - $this->logger->logException($e, ['level' => ILogger::WARN]); + $this->logger->warning($e->getMessage(), ['exception' => $e]); return false; } } catch (\Exception $e) { - $this->logger->logException($e, ['level' => ILogger::WARN]); + $this->logger->warning($e->getMessage(), ['exception' => $e]); return false; } unset($this->statCache[$absoluteSource], $this->statCache[$absoluteTarget]); @@ -431,7 +431,7 @@ public function unlink($path) { } catch (ForbiddenException $e) { return false; } catch (ConnectException $e) { - $this->logger->logException($e, ['message' => 'Error while deleting file']); + $this->logger->error('Error while deleting file', ['exception' => $e]); throw new StorageNotAvailableException($e->getMessage(), (int)$e->getCode(), $e); } } @@ -518,7 +518,7 @@ public function fopen($path, $mode) { } catch (OutOfSpaceException $e) { throw new EntityTooLargeException("not enough available space to create file", 0, $e); } catch (ConnectException $e) { - $this->logger->logException($e, ['message' => 'Error while opening file']); + $this->logger->error('Error while opening file', ['exception' => $e]); throw new StorageNotAvailableException($e->getMessage(), (int)$e->getCode(), $e); } } @@ -545,7 +545,7 @@ public function rmdir($path) { } catch (ForbiddenException $e) { return false; } catch (ConnectException $e) { - $this->logger->logException($e, ['message' => 'Error while removing folder']); + $this->logger->error('Error while removing folder', ['exception' => $e]); throw new StorageNotAvailableException($e->getMessage(), (int)$e->getCode(), $e); } } @@ -561,7 +561,7 @@ public function touch($path, $mtime = null) { } catch (OutOfSpaceException $e) { throw new EntityTooLargeException("not enough available space to create file", 0, $e); } catch (ConnectException $e) { - $this->logger->logException($e, ['message' => 'Error while creating file']); + $this->logger->error('Error while creating file', ['exception' => $e]); throw new StorageNotAvailableException($e->getMessage(), (int)$e->getCode(), $e); } } @@ -658,7 +658,7 @@ public function mkdir($path) { $this->share->mkdir($path); return true; } catch (ConnectException $e) { - $this->logger->logException($e, ['message' => 'Error while creating folder']); + $this->logger->error('Error while creating folder', ['exception' => $e]); throw new StorageNotAvailableException($e->getMessage(), (int)$e->getCode(), $e); } catch (Exception $e) { return false; @@ -736,7 +736,7 @@ public function test() { } catch (ForbiddenException $e) { return false; } catch (Exception $e) { - $this->logger->logException($e); + $this->logger->error($e->getMessage(), ['exception' => $e]); return false; } } diff --git a/apps/files_external/lib/MountConfig.php b/apps/files_external/lib/MountConfig.php index 23d72bdcf1850..ff631d82e26a9 100644 --- a/apps/files_external/lib/MountConfig.php +++ b/apps/files_external/lib/MountConfig.php @@ -47,8 +47,8 @@ use OCA\Files_External\Service\UserGlobalStoragesService; use OCA\Files_External\Service\UserStoragesService; use OCP\Files\StorageNotAvailableException; -use OCP\IUser; use phpseclib\Crypt\AES; +use Psr\Log\LoggerInterface; /** * Class to configure mount.json globally and for users @@ -138,7 +138,7 @@ public static function getBackendStatus($class, $options, $isPersonal, $testOnly throw $e; } } catch (\Exception $exception) { - \OC::$server->getLogger()->logException($exception, ['app' => 'files_external']); + \OC::$server->get(LoggerInterface::class)->error($exception->getMessage(), ['exception' => $exception, 'app' => 'files_external']); throw $exception; } } diff --git a/apps/files_external/lib/Service/LegacyStoragesService.php b/apps/files_external/lib/Service/LegacyStoragesService.php index 325e625569118..5b008995b43b4 100644 --- a/apps/files_external/lib/Service/LegacyStoragesService.php +++ b/apps/files_external/lib/Service/LegacyStoragesService.php @@ -27,7 +27,7 @@ namespace OCA\Files_External\Service; use OCA\Files_External\Lib\StorageConfig; -use OCP\ILogger; +use Psr\Log\LoggerInterface; /** * Read mount config from legacy mount.json @@ -143,7 +143,7 @@ public function getAllStorages() { $parts = explode('/', ltrim($rootMountPath, '/'), 3); if (count($parts) < 3) { // something went wrong, skip - \OC::$server->getLogger()->error('Could not parse mount point "' . $rootMountPath . '"', ['app' => 'files_external']); + \OC::$server->get(LoggerInterface::class)->error('Could not parse mount point "' . $rootMountPath . '"', ['app' => 'files_external']); continue; } $relativeMountPath = rtrim($parts[2], '/'); @@ -191,10 +191,9 @@ public function getAllStorages() { } } catch (\UnexpectedValueException $e) { // don't die if a storage backend doesn't exist - \OC::$server->getLogger()->logException($e, [ - 'message' => 'Could not load storage.', - 'level' => ILogger::ERROR, + \OC::$server->get(LoggerInterface::class)->error('Could not load storage.', [ 'app' => 'files_external', + 'exception' => $e, ]); } } diff --git a/apps/files_external/lib/Service/StoragesService.php b/apps/files_external/lib/Service/StoragesService.php index bd1793c93bc93..cef82e53343cf 100644 --- a/apps/files_external/lib/Service/StoragesService.php +++ b/apps/files_external/lib/Service/StoragesService.php @@ -44,7 +44,6 @@ use OCP\Files\Config\IUserMountCache; use OCP\Files\Events\InvalidateMountCacheEvent; use OCP\Files\StorageNotAvailableException; -use OCP\ILogger; /** * Service class to manage external storage @@ -119,17 +118,15 @@ protected function getStorageConfigFromDBMount(array $mount) { return $config; } catch (\UnexpectedValueException $e) { // don't die if a storage backend doesn't exist - \OC::$server->getLogger()->logException($e, [ - 'message' => 'Could not load storage.', - 'level' => ILogger::ERROR, + \OC::$server->get(LoggerInterface::class)->error('Could not load storage.', [ 'app' => 'files_external', + 'exception' => $e, ]); return null; } catch (\InvalidArgumentException $e) { - \OC::$server->getLogger()->logException($e, [ - 'message' => 'Could not load storage.', - 'level' => ILogger::ERROR, + \OC::$server->get(LoggerInterface::class)->error('Could not load storage.', [ 'app' => 'files_external', + 'exception' => $e, ]); return null; } diff --git a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php index 0963cd06f0015..60b13597e78c4 100644 --- a/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/GlobalStoragesControllerTest.php @@ -31,9 +31,9 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IUserSession; +use Psr\Log\LoggerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; class GlobalStoragesControllerTest extends StoragesControllerTest { @@ -65,7 +65,7 @@ private function createController($allowCreateLocal = true) { $this->createMock(IRequest::class), $this->createMock(IL10N::class), $this->service, - $this->createMock(ILogger::class), + $this->createMock(LoggerInterface::class), $session, $this->createMock(IGroupManager::class), $config diff --git a/apps/files_external/tests/Controller/UserStoragesControllerTest.php b/apps/files_external/tests/Controller/UserStoragesControllerTest.php index f4de39fcd2b5e..6e5224e94831a 100644 --- a/apps/files_external/tests/Controller/UserStoragesControllerTest.php +++ b/apps/files_external/tests/Controller/UserStoragesControllerTest.php @@ -34,9 +34,9 @@ use OCP\IConfig; use OCP\IGroupManager; use OCP\IL10N; -use OCP\ILogger; use OCP\IRequest; use OCP\IUserSession; +use Psr\Log\LogLevel; use Symfony\Component\EventDispatcher\EventDispatcherInterface; class UserStoragesControllerTest extends StoragesControllerTest { @@ -73,7 +73,7 @@ private function createController($allowCreateLocal = true) { $this->createMock(IRequest::class), $this->createMock(IL10N::class), $this->service, - $this->createMock(ILogger::class), + $this->createMock(LogLevel::class), $session, $this->createMock(IGroupManager::class), $config diff --git a/core/js/mimetypelist.js b/core/js/mimetypelist.js index d861695c0ac6d..d269b83cd95c4 100644 --- a/core/js/mimetypelist.js +++ b/core/js/mimetypelist.js @@ -7,114 +7,7 @@ * To regenerate this file run ./occ maintenance:mimetype:update-js */ OC.MimeTypeList={ - aliases: { - "application/coreldraw": "image", - "application/epub+zip": "text", - "application/font-sfnt": "image", - "application/font-woff": "image", - "application/gpx+xml": "location", - "application/illustrator": "image", - "application/javascript": "text/code", - "application/json": "text/code", - "application/msaccess": "file", - "application/msexcel": "x-office/spreadsheet", - "application/msonenote": "x-office/document", - "application/mspowerpoint": "x-office/presentation", - "application/msword": "x-office/document", - "application/octet-stream": "file", - "application/postscript": "image", - "application/rss+xml": "application/xml", - "application/vnd.android.package-archive": "package/x-generic", - "application/vnd.lotus-wordpro": "x-office/document", - "application/vnd.garmin.tcx+xml": "location", - "application/vnd.google-earth.kml+xml": "location", - "application/vnd.google-earth.kmz": "location", - "application/vnd.ms-excel": "x-office/spreadsheet", - "application/vnd.ms-excel.addin.macroEnabled.12": "x-office/spreadsheet", - "application/vnd.ms-excel.sheet.binary.macroEnabled.12": "x-office/spreadsheet", - "application/vnd.ms-excel.sheet.macroEnabled.12": "x-office/spreadsheet", - "application/vnd.ms-excel.template.macroEnabled.12": "x-office/spreadsheet", - "application/vnd.ms-fontobject": "image", - "application/vnd.ms-powerpoint": "x-office/presentation", - "application/vnd.ms-powerpoint.addin.macroEnabled.12": "x-office/presentation", - "application/vnd.ms-powerpoint.presentation.macroEnabled.12": "x-office/presentation", - "application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "x-office/presentation", - "application/vnd.ms-powerpoint.template.macroEnabled.12": "x-office/presentation", - "application/vnd.ms-visio.drawing.macroEnabled.12": "application/vnd.visio", - "application/vnd.ms-visio.drawing": "application/vnd.visio", - "application/vnd.ms-visio.stencil.macroEnabled.12": "application/vnd.visio", - "application/vnd.ms-visio.stencil": "application/vnd.visio", - "application/vnd.ms-visio.template.macroEnabled.12": "application/vnd.visio", - "application/vnd.ms-visio.template": "application/vnd.visio", - "application/vnd.ms-word.document.macroEnabled.12": "x-office/document", - "application/vnd.ms-word.template.macroEnabled.12": "x-office/document", - "application/vnd.oasis.opendocument.presentation": "x-office/presentation", - "application/vnd.oasis.opendocument.presentation-template": "x-office/presentation", - "application/vnd.oasis.opendocument.spreadsheet": "x-office/spreadsheet", - "application/vnd.oasis.opendocument.spreadsheet-template": "x-office/spreadsheet", - "application/vnd.oasis.opendocument.text": "x-office/document", - "application/vnd.oasis.opendocument.text-master": "x-office/document", - "application/vnd.oasis.opendocument.text-template": "x-office/document", - "application/vnd.oasis.opendocument.graphics": "x-office/drawing", - "application/vnd.oasis.opendocument.graphics-template": "x-office/drawing", - "application/vnd.oasis.opendocument.text-web": "x-office/document", - "application/vnd.oasis.opendocument.text-flat-xml": "x-office/document", - "application/vnd.oasis.opendocument.spreadsheet-flat-xml": "x-office/spreadsheet", - "application/vnd.oasis.opendocument.graphics-flat-xml": "x-office/drawing", - "application/vnd.oasis.opendocument.presentation-flat-xml": "x-office/presentation", - "application/vnd.openxmlformats-officedocument.presentationml.presentation": "x-office/presentation", - "application/vnd.openxmlformats-officedocument.presentationml.slideshow": "x-office/presentation", - "application/vnd.openxmlformats-officedocument.presentationml.template": "x-office/presentation", - "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "x-office/spreadsheet", - "application/vnd.openxmlformats-officedocument.spreadsheetml.template": "x-office/spreadsheet", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "x-office/document", - "application/vnd.openxmlformats-officedocument.wordprocessingml.template": "x-office/document", - "application/vnd.visio": "x-office/document", - "application/vnd.wordperfect": "x-office/document", - "application/x-7z-compressed": "package/x-generic", - "application/x-bzip2": "package/x-generic", - "application/x-cbr": "text", - "application/x-compressed": "package/x-generic", - "application/x-dcraw": "image", - "application/x-deb": "package/x-generic", - "application/x-fictionbook+xml": "text", - "application/x-font": "image", - "application/x-gimp": "image", - "application/x-gzip": "package/x-generic", - "application/x-iwork-keynote-sffkey": "x-office/presentation", - "application/x-iwork-numbers-sffnumbers": "x-office/spreadsheet", - "application/x-iwork-pages-sffpages": "x-office/document", - "application/x-mobipocket-ebook": "text", - "application/x-perl": "text/code", - "application/x-photoshop": "image", - "application/x-php": "text/code", - "application/x-rar-compressed": "package/x-generic", - "application/x-tar": "package/x-generic", - "application/x-tex": "text", - "application/xml": "text/html", - "application/yaml": "text/code", - "application/zip": "package/x-generic", - "database": "file", - "httpd/unix-directory": "dir", - "text/css": "text/code", - "text/csv": "x-office/spreadsheet", - "text/html": "text/code", - "text/x-c": "text/code", - "text/x-c++src": "text/code", - "text/x-h": "text/code", - "text/x-java-source": "text/code", - "text/x-ldif": "text/code", - "text/x-python": "text/code", - "text/x-shellscript": "text/code", - "web": "text/code", - "application/internet-shortcut": "link", - "application/km": "mindmap", - "application/x-freemind": "mindmap", - "application/vnd.xmind.workbook": "mindmap", - "image/targa": "image/tga", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.oform": "x-office/form", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document.docxf": "x-office/form-template" -}, + aliases: [], files: [ "application", "application-pdf",