this is the error i keep getting ...
Warning (512): GeneratorBehavior::make - Failed to make version `s` of
file `/var/www/optogrupo/app/webroot/media/transfer/img/
dsc02738_13.jpg`. [APP/plugins/media/models/behaviors/generator.php,
line 167]
... when I try to set up Media filter instructions inside a model on a
beforeValdate method:
$l = array('convert' => 'image/jpeg', 'fit' => array(600,
450));
$m = array('convert' => 'image/jpeg', 'fitCrop' => array(318,
160));
$s = array('convert' => 'image/jpeg', 'fit' => array(200,
125));
Configure::write('Media.filter', array('image' =>
compact('m','l','s')));
return true;
On 11 dez, 16:38, huoxito <[email protected]> wrote:
> Could anybody post any examples on how I could have Media.filter
> instructions on the same upload?
>
> I want to upload two kind of images on the same form, For one of them
> I need only two copies, versions. And for the other one I need three
> copies I tried to do it on a beforeFilter but I was still getting some
> errors saying that the generator behavior couldn't created some
> versions. Now itm trying this code but I still don't feel that I got
> the plugin working idea right so far:
>
> function beforeValidate(){
>
> if(isset($this->data['AttachmentNoticias']['group'])){
>
> if($this->data['AttachmentNoticias']['group'] ===
> 'imgFront'){
> $l = array('convert' => 'image/jpeg', 'fit' =>
> array(600, 450));
> $m = array('convert' => 'image/jpeg', 'fitCrop' =>
> array(318, 160));
> $s = array('convert' => 'image/jpeg', 'fit' =>
> array(200, 125));
> }
>
> if($this->data['AttachmentNoticias']['group'] ===
> 'imgText'){
> $l = array('convert' => 'image/jpeg', 'fit' =>
> array(600, 450));
> $m = array('convert' => 'image/jpeg', 'fitCrop' =>
> array(318, 160));
> $s = array('convert' => 'image/jpeg', 'fit' =>
> array(200, 125));
> }
>
> Configure::write('Media.filter', array('image' =>
> compact('m','l','s')));
> }
>
> return true;
> }
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en