I'm trying to upload file using ajax (jquery) in cakephp with JS handler. When i submit the form then cake request doesn't work ... on the other hand with out js submit it's working fine .
<?php echo $this->Form->create('term',array('action'=>'file_upload' , 'type'=>'file' ) ) ?>
<?php echo $this->Form->input('file',array('type'=>'file'));
<?php echo $this->Js->submit('upload',array('update'=>'#context')); ?>
Controller action
public function file_upload(){
if( $this->request->is( 'post' ) ){
pr( $this->request->data );
}
}
it's not working for Js->Submit but working fine for normal submit. any solution for submitting form with ajax ??