I am using actas-image-column-behavior for image upload, image upload
is successful, but giving error in displaying the image,

my model:

<?php
class category extends AppModel
{
 var $name = 'Category';
 var $primaryKey = 'categoryId';
 var $displayField = 'categoryName';

 var $belongsTo = array(
        'Parentnic' =>
            array('className' => 'Category',
                  'foreignKey' => 'parentID'
        ),
     );

 var $hasMany = array(
        'Childnic' =>
            array('className' => 'Category',
                          'foreignKey' => 'parentID'
            ),
    );

 var $validate = array(
        'categoryName' => array(
                'too_short' => array('rule' => array('minLength',
1),'message'=>'Category Name cannot be empty'),
                'unique' => array('rule' => array('isUnique'),
'message'=>'That Category Name is not available'),
                'required' => array('rule' => array('minLength', 1),
'required' =>true, 'on' => 'create', 'message'=>'Category Name is
required'),
        ),
        );

 var $actsAs= array(
                'Image'=>array(
                        'fields'=>array(
                                'catImage'=>array(
                                        'thumbnail'=>array('create'=>true),
                                        'resize'=>array(
                                                                         
'width'=>'800',
                                                                         
'height'=>'800',
                                                ),
                                        'versions'=>array(
                                                array('prefix'=>'s',
                                                                         
'width'=>'400',
                                                                         
'height'=>'300',
                                                ),
                                                array('prefix'=>'l',
                                                                         
'width'=>'700',
                                                                         
'height'=>'500',
                                                )
                                        )
                                )
                        )
                )
        );
}
?>

my controller for view

function admin_view($id)
{
   $this->Category->id = $id;
   $this->set('data', $this->Category->read());
}

my view is:
<?php echo $html->image($data['Category']['catImage']['s']); ?>
<?php echo $html->image($data['Category']['catImage']['l']); ?>
<?php echo $html->image($data['Category']['catImage']['path']); ?>
<?php echo $html->image($data['Category']['catImage']['thumb']); ?>

but all cases it is returning :  <img src="/cake/img/i" alt="" />

Anyone can point out where is the prob?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to