diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 9e31e7a50e..0ca171f245 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -37,6 +37,7 @@ use OCA\Richdocuments\Listener\ShareLinkListener; use OCA\Richdocuments\Middleware\WOPIMiddleware; use OCA\Richdocuments\PermissionManager; +use OCA\Richdocuments\Preview\EMF; use OCA\Richdocuments\Preview\MSExcel; use OCA\Richdocuments\Preview\MSWord; use OCA\Richdocuments\Preview\OOXML; @@ -88,6 +89,7 @@ public function register(IRegistrationContext $context): void { 'getPathForToken', 'getWopiForToken', ]); + $context->registerPreviewProvider(EMF::class, '/image\/emf/'); } public function boot(IBootContext $context): void { diff --git a/lib/Preview/EMF.php b/lib/Preview/EMF.php new file mode 100644 index 0000000000..2ecb0a12f2 --- /dev/null +++ b/lib/Preview/EMF.php @@ -0,0 +1,35 @@ + + * + * @author Daniel Kesselberg + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + * + */ +namespace OCA\Richdocuments\Preview; + +class EMF extends Office { + /** + * {@inheritDoc} + */ + public function getMimeType() { + return '/image\/emf/'; + } +}