#1 2016-06-15 19:47:49

colo
Member
Registered: 2013-05-29
Posts: 12

Resize on upload images doesn't work v1.0.8

Hello,
i'm tring to upload images and resize them when they are bigger of the max width and height params, but in the new ionize it not works.
With the v1.0.7 it works.

Does anybody has some idea or solution?

Thankyou

Last edited by colo (2016-06-16 14:52:42)

Offline

#2 2016-06-17 10:47:33

PGrafiek
Member
Registered: 2013-03-18
Posts: 24

Re: Resize on upload images doesn't work v1.0.8

hi
i have the same problem sad
thanks

Offline

#3 2016-10-21 21:42:08

epescol
Member
Registered: 2012-05-27
Posts: 86

Re: Resize on upload images doesn't work v1.0.8

this patch solves the problem

--- a/application/libraries/Filemanager.php
+++ b/application/libraries/Filemanager.php
@@ -1535,7 +1535,7 @@ class FileManager
 
                                        // Resize after upload if asked
                                        $mime = $this->getMimeFromExtension($filename);
-                                       if ($this->startsWith($mime, 'image/') && $resize === TRUE)
+                                       if ($this->startsWith($mime, 'image/') && $resize == TRUE)
                                        {
                                                $this->resizePicture($file_path);
                                        }
@@ -1641,7 +1641,7 @@ class FileManager
 
                                                // Resize after upload if asked
                                                $mime = $this->getMimeFromExtension($filename);
-                                               if ($this->startsWith($mime, 'image/') && $resize === TRUE)
+                                               if ($this->startsWith($mime, 'image/') && $resize == TRUE)
                                                {
                                                        $this->resizePicture($file_path);
                                                }

Offline

#4 2016-10-21 21:42:17

epescol
Member
Registered: 2012-05-27
Posts: 86

Re: Resize on upload images doesn't work v1.0.8

this patch solves the problem

--- a/application/libraries/Filemanager.php
+++ b/application/libraries/Filemanager.php
@@ -1535,7 +1535,7 @@ class FileManager
 
                                        // Resize after upload if asked
                                        $mime = $this->getMimeFromExtension($filename);
-                                       if ($this->startsWith($mime, 'image/') && $resize === TRUE)
+                                       if ($this->startsWith($mime, 'image/') && $resize == TRUE)
                                        {
                                                $this->resizePicture($file_path);
                                        }
@@ -1641,7 +1641,7 @@ class FileManager
 
                                                // Resize after upload if asked
                                                $mime = $this->getMimeFromExtension($filename);
-                                               if ($this->startsWith($mime, 'image/') && $resize === TRUE)
+                                               if ($this->startsWith($mime, 'image/') && $resize == TRUE)
                                                {
                                                        $this->resizePicture($file_path);
                                                }

Offline

#5 2016-12-01 02:54:24

colo
Member
Registered: 2013-05-29
Posts: 12

Re: Resize on upload images doesn't work v1.0.8

I think i found the true bug in application/libraries/Filemanager.php at line 1429

-        $resize = (bool) ! empty($headers['X-Resize']) ? $headers['X-Resize'] : FALSE;
+       $resize = (bool) isset($_POST['resize']) ? ! empty($_POST['resize']) : ! empty($headers['X-Resize']);

Last edited by colo (2016-12-01 02:55:31)

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations