Skip to content

Commit

Permalink
Postpone getAllMappings
Browse files Browse the repository at this point in the history
I'm not 100% sure about this change. It should not be necessary to call getAllMappings to register a new mime type. Probably a definition with config/mimetypemapping.json will overwrite this definition later. App initialization should be cheap. Expensive jobs like getAllMappings are bad.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
  • Loading branch information
kesselb committed Dec 7, 2019
1 parent 7904a7c commit c676507
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions keeweb/appinfo/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ public function __construct(array $urlParams=array()){
});

$mimeTypeDetector = \OC::$server->getMimeTypeDetector();

// Register custom mimetype we can hook in the frontend
$mimeTypeDetector->getAllMappings();
$mimeTypeDetector->registerType('kdbx', 'application/x-kdbx', 'application/x-kdbx');

// Script for registering file actions
Expand Down

0 comments on commit c676507

Please sign in to comment.