I saw Fonzie was making progress with uploadify (having a discussion with
himself on this list as I recall - but productive 1)

he documented his progress on uploadify forum - I also tried his findings to
partially good results - better than swfupload anyway

here is the link
http://www.uploadify.com/forum/viewtopic.php?f=7&t=5017&p=9334&hilit=cakephp#p9334


I managed to get files uploading (multiple files) but not able to
insert/update to db - and it logged me out after too

I was using cake 1.3 & latest uploadify too


- S



On 9 April 2010 08:47, luke BAKING barker <lukebar...@gmail.com> wrote:

> any luck with this? I would like to try uploadify but it seems there
> are only broken reports with cake in the google group? Anybody used it
> successfully out there?
>
> regards
>
> Luke
>
> On Mar 21, 10:41 pm, abocanegra <aaronbocane...@gmail.com> wrote:
> > Correction - However, problems still not fixed
> >
> > ################ upload function had a typo, fixed it but still not
> > uploading file
> >         function upload()
> >         {
> >          if (isset($this->params['form']['Filedata']))
> >                 {
> >         //Derived from theuploadify.php file - does not work
> >         $tempFile = $this->params['form']['Filedata']['name'];
> >                 $targetPath = 'http://www.whatartist.com/uploads/temp';
> >                 $targetFile =  str_replace('//','/',$targetPath) .
> $this->params['form']['Filedata']['name'];
> >
> >                 move_uploaded_file($tempFile,$targetFile);
> >
> >                 $image_path = $this->params['form']['Filedata']['name'];
> >
> >                                 if(isset($image_path))
> >                                 {
> >
> $this->Photo->saveField('image',$image_path);
> >                                         //Put success message and
> redirect here
> >                                 }else{
> >                                         //Put error message here
> >                                 }
> >                 }
> >         }
> >
> > Also, I beleive the multiple posting - beyond 2 entries - was a
> > session issue. I deleted all sessions in the phptmpdir and it fixed
> > that issue.
> > I still cannot upload the file though.
> >
> > On Mar 20, 9:40 pm, abocanegra <aaronbocane...@gmail.com> wrote:
> >
> >
> >
> > > Alright, ahead of time thanks for any help on this. I have been
> > > researching for far longer than I care to admit. I am attempting to
> > > getuploadify2.1 to work with cakePHP 1.3. I have read up a great
> > > deal on other formats as well, such as swfupload.
> >
> > > Controller name = photos_controller.php
> > >           relevant functions = upload & addmult
> > > Model Name = photo.php
> > > views= addmult.ctp (upload.ctp is just the function being called from
> > > addmult)
> >
> > > Sucesses - I have been able to get the browse and upload working (on
> > > the surface). It appears to handle a multi-upload, or at least goes
> > > through the paces. Also I am able to trigger the upload function from
> > > the controller and add either the name using $this->params['form']
> > > ['Filedata']['name'].
> >
> > > Problems -
> > >  I cannot get the file uploaded to my uploads/temp directory (it is
> > > 777 and works well with my single image upload script). I have tried
> > > every variation including absolute paths to get to it
> > > .
> > > There does not seem to be any error messages, I have tried adding a
> > > few from the various forums, none have done anything.
> >
> > > When I trigger the multiple uploads it goes through the paces, but
> > > only adds one entry into the database.
> > > Also It appears the database tends to only accept 2 entries, though I
> > > haven't thoroughly tested that problem.
> >
> > > Goal -
> > > I am hoping to implement this function so that I can utilize it with
> > > image.php which i have altered to create the files in the manner I
> > > need. To do this I will need to be able to send the file to image.php
> > > for scale changes, multifolder organization and name changes. After
> > > which it will redirect to a page to add the additional info (title,
> > > client, etc) needed.
> >
> > > Any advice on any of the issues would be appreciated.
> >
> > > Code Snippets:
> >
> > > Controller:
> > > #################################################
> > > class PhotosController extends AppController {
> >
> > >         var $name = 'Photos';
> > >         var $components = array("Image");
> > >         var $helpers = array('Html', 'Javascript', 'Form');
> >
> > >         function beforeFilter() {
> > >         if ($this->action == 'upload') {
> > >             $this->Session->id($this->params['pass'][0]);
> > >             $this->Session->start();
> > >         }
> > >         parent::beforeFilter();
> > >     }
> >
> > >         function upload()
> > >         {
> > >          if (isset($this->params['form']['Filedata']))
> > >                 {
> > >         //Derived from theuploadify.php file - does not work
> > >         //$tempFile = $this->params['form']['Filedata']['tmp_name'];
> > >         //      $targetPath = 'http://www.whatartist.coms/uploads/temp
> ';
> > >         //      $targetFile =  str_replace('//','/',$targetPath) .
> $this->params['form']['Filedata']['name'];
> >
> > >                 //move_uploaded_file($tempFile,$targetFile);
> >
> > >                 $image_path =
> $this->params['form']['Filedata']['name'];
> >
> > >                                 if(isset($image_path))
> > >                                 {
> > >
> $this->Photo->saveField('image',$image_path);
> > >                                         //Put success message and
> redirect here
> > >                                 }else{
> > >                                         //Put error message here
> > >                                 }
> > >                 }
> > >         }
> >
> > >  // Handle multiple incoming uploads.
> > >         function addmulti() {
> > >            //Left empty because it was providing no functionality
> > >           // I did try posting to this instead of upload function but
> > > didn't work so cleared it
> > >         }
> >
> > >         function upload()
> > >         {
> > >          if (isset($this->params['form']['Filedata']))
> > >                 {
> >
> > > //Derived from theuploadify.php file - does not work
> > >         //$tempFile = $this->params['form']['Filedata']['tmp_name'];
> > >         //      $targetPath = 'http://www.whatartist.coms/uploads/temp
> ';
> > >         //      $targetFile =  str_replace('//','/',$targetPath) .
> $this->params['form']['Filedata']['name'];
> >
> > >         //move_uploaded_file($tempFile,$targetFile);
> >
> > >                 $image_path =
> $this->params['form']['Filedata']['name']; //Works
> >
> > >                                 if(isset($image_path))
> > >                                 {
> > >
> $this->Photo->saveField('image',$image_path);
> > >                                         //Put success message and
> redirect here
> > >                                 }else{
> > >                                         //Put error message here
> > >                                 }
> > >                 }
> > >         }
> >
> > > //View - addmult.ctp
> > > ############################################################
> >
> > > <script type="text/javascript">
> > >   $(document).ready(function() {
> > >         $("#fileInput2").uploadify({
> > >                 'uploader'       : '/admin/swf/uploadify.swf',
> > >                 'script'         : '<?php echo
> $html->url('/photos/upload/'.$session->id()); ?>',
> >
> > >                 'cancelImg'      : '/admin/img/cancel.png',
> > >                 'fileExt'                : '*.jpg;*.jpeg;*.png;*.gif',
> > >                 'folder'         : '../../../uploads/temp',
> > >                 'multi'          : true,
> > >                 'auto'                   : true,
> > >         'fileExt'                : '*.jpg;*.jpeg;*.png;*.gif'
> > >         });});
> >
> > > </script>
> >
> > > <p><strong>Multiple File Upload</strong></p>
> > > <input id="fileInput2" name="fileInput2" type="file" />
> > > <a href="javascript:$('#fileInput2').uploadifyClearQueue();">Clear
> > > Queue</a>
> >
> > > Model - Photo.php (taken from one of the forums, not sure it has any
> > > use at this point)
> > > ###################################################
> > >  function findByPath ($path, $name) {
> > >         return $this->find("name = '$name' and path = '$path'");
> > >     }
> >
> > > Hopefully that is enough detail.
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe, reply using "remove me" as the subject.
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to