narasimharaosp narasimharaosp - 7 months ago 23
PHP Question

multiple images uploading and converting them to thumbnails in cakephp

Please can anyone help me out in finding the best imagecomponent for uploading, resizing, cropping.
And little help is needed in this following code.....

index.ctp

<?php
echo $this->form->create(array('type'=>'file'));
echo $this->form->input('upload',array('type'=>'file','multiple'));
echo $this->form->end('submit');
?>


if I try to print the file info in TestsController.php

<?php
class TestsController extends AppController{

public function index(){
// echo '<pre>';
print_r($this->data);
}
}
?>


it ends up with an empty Array() ....is there any other way around...

Answer

help for your code..

    pr( $this->request->data );
    // user $this->request->data instead of $this->data
    //for printing submitted values 

and for image there is many component available you can use according your need.......... can visit these links.. http://bakery.cakephp.org/articles?by=crop

http://labs.iamkoa.net/2007/10/23/image-upload-component-cakephp/