diff options
author | Olivier Paroz <github@oparoz.com> | 2015-03-16 16:25:04 +0100 |
---|---|---|
committer | Olivier Paroz <github@oparoz.com> | 2015-03-16 16:25:04 +0100 |
commit | bef12488c38dd8ccf8ddf4963f85614ca6815137 (patch) | |
tree | 9414d0474205afd0c85c1c536578d47004ecd234 /lib/repair | |
parent | d5e884d6295800d27e046289d713bc27242ecfbb (diff) | |
download | nextcloud-server-bef12488c38dd8ccf8ddf4963f85614ca6815137.tar.gz nextcloud-server-bef12488c38dd8ccf8ddf4963f85614ca6815137.zip |
Introducing the Raw mimetypes
Diffstat (limited to 'lib/repair')
-rw-r--r-- | lib/repair/repairmimetypes.php | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/lib/repair/repairmimetypes.php b/lib/repair/repairmimetypes.php index 06cd144bff4..ad55c63c21a 100644 --- a/lib/repair/repairmimetypes.php +++ b/lib/repair/repairmimetypes.php @@ -171,6 +171,30 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep { self::updateMimetypes($updatedMimetypes); } + private function introduceRawMimeType() { + $updatedMimetypes = array( + 'arw' => 'image/x-dcraw', + 'cr2' => 'image/x-dcraw', + 'dcr' => 'image/x-dcraw', + 'dng' => 'image/x-dcraw', + 'erf' => 'image/x-dcraw', + 'iiq' => 'image/x-dcraw', + 'k25' => 'image/x-dcraw', + 'kdc' => 'image/x-dcraw', + 'mef' => 'image/x-dcraw', + 'nef' => 'image/x-dcraw', + 'orf' => 'image/x-dcraw', + 'pef' => 'image/x-dcraw', + 'raf' => 'image/x-dcraw', + 'rw2' => 'image/x-dcraw', + 'srf' => 'image/x-dcraw', + 'sr2' => 'image/x-dcraw', + 'xrf' => 'image/x-dcraw', + ); + + self::updateMimetypes($updatedMimetypes); + } + /** * Fix mime types */ @@ -190,5 +214,9 @@ class RepairMimeTypes extends BasicEmitter implements \OC\RepairStep { if ($this->fixPostscriptMimeType()) { $this->emit('\OC\Repair', 'info', array('Fixed Postscript mime types')); } + + if ($this->introduceRawMimeType()) { + $this->emit('\OC\Repair', 'info', array('Fixed Raw mime types')); + } } -}
\ No newline at end of file +} |