summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2020-01-28 20:20:01 +0100
committerGitHub <noreply@github.com>2020-01-28 20:20:01 +0100
commit28f50a8f4a701e76b17aa91f00fae662aea22876 (patch)
tree9d2c0d29d884bbf32e38956f967ed18540fa36ef /system/libraries/Upload.php
parent2b96e73d85365fb05a56e7464cdb341fd5a9d7b8 (diff)
parentf9a9239a32405fb458dbe2a086bc64c98d418c71 (diff)
[ci skip] Merge pull request #5882 from adevesa/webp-permission
image/webp upload type
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r--system/libraries/Upload.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 8c891cff6..95f765b78 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -867,7 +867,7 @@ class CI_Upload {
$this->file_type = 'image/jpeg';
}
- $img_mimes = array('image/gif', 'image/jpeg', 'image/png');
+ $img_mimes = array('image/gif', 'image/jpeg', 'image/png', 'image/webp');
return in_array($this->file_type, $img_mimes, TRUE);
}
@@ -901,7 +901,7 @@ class CI_Upload {
}
// Images get some additional checks
- if (in_array($ext, array('gif', 'jpg', 'jpeg', 'jpe', 'png'), TRUE) && @getimagesize($this->file_temp) === FALSE)
+ if (in_array($ext, array('gif', 'jpg', 'jpeg', 'jpe', 'png', 'webp'), TRUE) && @getimagesize($this->file_temp) === FALSE)
{
return FALSE;
}