From f0a6de54ae1f5ffb9ae7d2c20e92749e396e2b17 Mon Sep 17 00:00:00 2001 From: Devesa Agustín Date: Wed, 8 Jan 2020 12:26:16 -0300 Subject: Change Upload.php for image/webp --- system/libraries/Upload.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'system') 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; } -- cgit v1.2.3-24-g4f1b From d88fdc92c9a608fd92c124b7f078238b7d4f3eee Mon Sep 17 00:00:00 2001 From: Devesa Agustín Date: Tue, 14 Jan 2020 14:49:52 -0300 Subject: Update Upload.php --- system/libraries/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 39045c772..2e17b1463 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -901,7 +901,7 @@ class CI_Upload { } // Images get some additional checks - if (in_array($ext, array('gif', 'jpg', 'jpeg', 'jpe', 'png','webp'), 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; } -- cgit v1.2.3-24-g4f1b From f9a9239a32405fb458dbe2a086bc64c98d418c71 Mon Sep 17 00:00:00 2001 From: Devesa Agustín Date: Mon, 27 Jan 2020 23:56:42 -0300 Subject: Update Upload.php --- system/libraries/Upload.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system') diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php index 2e17b1463..95f765b78 100644 --- a/system/libraries/Upload.php +++ b/system/libraries/Upload.php @@ -901,7 +901,8 @@ class CI_Upload { } // Images get some additional checks - if (in_array($ext, array('gif', 'jpg', 'jpeg', 'jpe', 'png', 'webp'), 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; } -- cgit v1.2.3-24-g4f1b