MeioUpload icon indicating copy to clipboard operation
MeioUpload copied to clipboard

removeOriginal Dont work

Open ali786 opened this issue 13 years ago • 1 comments

hi removeOriginal Dont work !

i want upload thumbs only

(cakephp 2.1.2)

thanks

ali786 avatar May 14 '12 15:05 ali786

I had the same problem. This feature only works when useTable = false in the model.

This project is now depreciated but for anyone with the same issue who doesn't want to migrate: Open Model/Behavior/MeioUploadBehavior.php Look for this block of code which appears TWICE: // If the file is an image, try to make the thumbnails if ((count($options['thumbsizes']) > 0) && count($options['allowedExt']) > 0 && in_array($data[$model->alias][$fieldName]['type'], $this->_imageTypes)) { $this->_createThumbnails($model, $data, $fieldName, $saveAs, $ext, $options); }

After the SECOND instance insert the following code (which does appear already under the first instance): if ($options['removeOriginal']) { $this->_removeOriginal($saveAs); }

zzella avatar Apr 10 '13 17:04 zzella