file_error, error transmition

See all posts Reply

file_error, error transmition new!
by André Luiz Pereira, 9 years, 2 months ago
yii 1.1.16,

i create an controler to insert image im my image/upload... but print error "Erro de transmissão. Favor tentar novamente. "???

my main:
'imgMod'=>array(
'class'=>'application.components.imagemManager.CImageModifier',
),

my controller:

$img = Yii::app()->imgMod->load($_POST['CadastrosPessoas']['foto_casa']);

if ($img->uploaded) { //** this error detected **
$img->image_resize = true;
$img->image_ratio_y = true;
$img->image_x = 50;
$img->file_new_name_body = md5($img->file_src_name);
$img->process(Yii::getPathOfAlias('path_uploads').'/usuarios/foto_casa/');
if ($img->processed) {
echo 'image resized';
$img->clean(); //delete original image
} else {
echo 'error : ' . $img->error;
}
}else{
echo 'Erro2:'.$img->error;
}

my view:

beginWidget('CActiveForm', array(
'id'=>'pessoas-form',
'enableClientValidation'=>true,
'clientOptions'=>array(

'validateOnSubmit'=>true,
),
'htmlOptions'=>array('enctype' => 'multipart/form-data')
)); ?>

.....Reply
Re: file_error, error transmition new!
by colin, 9 years, 2 months ago
Please check the log produced by the class, it will tell you everything.Reply