summaryrefslogtreecommitdiffstats
path: root/system/libraries/Upload.php
diff options
context:
space:
mode:
authorDevesa Agustín <devesagustserwi@est.frba.utn.edu.ar>2020-01-08 16:26:16 +0100
committerGitHub <noreply@github.com>2020-01-08 16:26:16 +0100
commitf0a6de54ae1f5ffb9ae7d2c20e92749e396e2b17 (patch)
tree2d3ce82612a69e1b7e04e66db5242710078fd209 /system/libraries/Upload.php
parent0db8b60492cc98ef3c85b986fc11e9dac6d7ca6c (diff)
Change Upload.php for image/webp
Diffstat (limited to 'system/libraries/Upload.php')
-rw-r--r--system/libraries/Upload.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 8c891cff6..39045c772 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,8 +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;
}