diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-04-26 01:22:49 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-26 01:22:49 -0300 |
commit | d4329f33556eaac6e863c2733e2e05964f3d0935 (patch) | |
tree | 2de5db28089ea4d51ef2034df2ad333084d49fd1 /lib | |
parent | 215573fe3ceecd701079961b598fbae9871da07b (diff) | |
parent | 8ba67fbe1ec54dd961b8df9c0dda12efb5ca8ebb (diff) | |
download | nextcloud-server-d4329f33556eaac6e863c2733e2e05964f3d0935.tar.gz nextcloud-server-d4329f33556eaac6e863c2733e2e05964f3d0935.zip |
Merge pull request #4449 from stweil/mimetypes
Add mimetypes for jp2 and webp
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Repair/RepairMimeTypes.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/Repair/RepairMimeTypes.php b/lib/private/Repair/RepairMimeTypes.php index 534b5ce2c28..d60b507e932 100644 --- a/lib/private/Repair/RepairMimeTypes.php +++ b/lib/private/Repair/RepairMimeTypes.php @@ -110,6 +110,15 @@ class RepairMimeTypes implements IRepairStep { } } + private function introduceImageTypes() { + $updatedMimetypes = array( + 'jp2' => 'image/jp2', + 'webp' => 'image/webp', + ); + + $this->updateMimetypes($updatedMimetypes); + } + private function introduceWindowsProgramTypes() { $updatedMimetypes = array( 'htaccess' => 'text/plain', @@ -130,6 +139,10 @@ class RepairMimeTypes implements IRepairStep { // NOTE TO DEVELOPERS: when adding new mime types, please make sure to // add a version comparison to avoid doing it every time + if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.14', '<') && $this->introduceImageTypes()) { + $out->info('Fixed image mime types'); + } + if (version_compare($ocVersionFromBeforeUpdate, '12.0.0.13', '<') && $this->introduceWindowsProgramTypes()) { $out->info('Fixed windows program mime types'); } |