summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2020-01-28 20:20:01 +0100
committerAndrey Andreev <narf@devilix.net>2020-01-28 20:20:25 +0100
commite7a52b1c0bd93cf7ab41c7fcb0a2a9634c60a22e (patch)
tree40ce3bf9e080b7b9659d0b501ee7342c94d58dab
parentced499f7ad90ff8bb6bf0faa2e24a1593204de9a (diff)
[ci skip] Merge pull request #5882 from adevesa/webp-permission
image/webp upload type
-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 29f9f5ff9..ed78af18c 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;
}