Hi All, I have Nick Baker's FileUpload working for an image gallery aloong with a phpThumb generator and all works well except if there is an existing file in the folder. The FileUpload plugin is renaming the files correctly e.g. filename-1.jpg but I have something wrong in my controller where I am calling the original name of the uploaded file and not the newly generated name so the thumbnail is being created off filename.jpg.
I have an add function in my GalleryphotosController that has this line: if(!$this->PhpThumb- >generateThumbnail($_SERVER['DOCUMENT_ROOT'] . '/siteadmin/app/webroot/ files/galleryphotos/' . $this->data['Galleryphoto']['file']['name'], $_SERVER['DOCUMENT_ROOT'] . '/siteadmin/app/webroot/files/ galleryphotos/thumbs/' . $this->data['Galleryphoto']['file']['name'])) { pr($this->PhpThumb->errors); } I'm sure all I need to do is replace $this->data['Galleryphoto'] ['file']['name'] with the filename that the plugin makes but I cannot work out how. I'm sure it is simple but everything I have tried is failing. I am using cakephp 2.0.5 Thanks -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php