Image Manipulation |
I did this 2 days ago! Or yesterday maybe...
basically, you don't need this (unless you want to run more security checks on the file before moving itto desired folder? or keep the original?): $img->move(WRITEPATH.'uploads/photos', $newName); just fiddle with the temporary upload path if($img->isValid() && ! $img->hasMoved()){ $newName = $img->getRandomName(); //$img->move(WRITEPATH.'uploads/photos', $newName); <--- not needed $source = $img->getTempName(); $image = \Config\Services::image() ->withFile($source) ->fit(100, 100, 'center') ->save($targetDirectory.'/'.$newName); }
You can see things I made with codeigniter here: itart.pro its not overly impressive as I have very little time to learn.
|
Messages In This Thread |
Image Manipulation - by Marcolino92 - 04-14-2020, 11:19 AM
RE: Image Manipulation - by Leo - 04-14-2020, 03:55 PM
RE: Image Manipulation - by Marcolino92 - 04-14-2020, 11:14 PM
|