Thank's for the respond.But what did u mean by saying i cant save files with ajax . What is it dat we see all around .. In most of the sites the photo is uploaded by ajax .
And no i'm not using a js script with an iframe hack. I dont know what it is .:)..
Will any change in my previous code help me upload my picture . If not, What is the best way
On Monday, 2 April 2012 01:56:45 UTC+5:30, Miles J wrote:
You can't save files with AJAX. Are you using a JS script that's using the iframe hack?
On Saturday, March 31, 2012 12:41:41 PM UTC-7, aSh!Q's wrote:I wanted to upload a picture of the user via ajax. I checked the media plugin but found it a little bit hard seeing all those instructions. Is there any better way ? What is the best way ?I was thinking of using the submit option of the jshelper . And i created the following page.<?phpecho $this->Form->create('Photo',array('type'=>'file')); echo $this->Form->file('Photo.image'); echo $this->Js->Submit('Add Picture',array('url'=>'/users/savepicture','class'=>'button' , 'before'=>$this->Js->get('#right-box')->effect('fadeOut') , 'success'=>$this->Js->get('#right-box')->effect('fadeIn'), 'update'=>'#right-box' ));echo $this->Form->end();echo $this->Js->writebuffer();?>In the controller I tried to debug ($this->data) just to get an understanding of how the file is uploaded . But i see no data being uploaded . The debug returns an empty array . Help me ??
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment