Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removeOriginal Dont work #99

Open
ali786 opened this issue May 14, 2012 · 1 comment
Open

removeOriginal Dont work #99

ali786 opened this issue May 14, 2012 · 1 comment

Comments

@ali786
Copy link

ali786 commented May 14, 2012

hi removeOriginal Dont work !

i want upload thumbs only

(cakephp 2.1.2)

thanks

@zzella
Copy link

zzella commented Apr 10, 2013

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);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants