I'm using the advice www.jamesfairhurst.co.uk/posts/view/uploading_files_and_images_with_cakephp to handle uploading images.
The function uploads the files to the appropriate folder and then returns a url which I add to $this->data so the location of the image is saved in the database To call the function: $fileOK = $this->uploadFiles('img/files/campaigns', $this- >data['File']); Then add the url to the array to be saved $this->data['User']['image_url'] = $fileOK['urls'][0]; image_url would end up looking like: files/campaigns/userphoto.jpg After I've done this, I want to resize the image a couple of times so I have a large thumbnail and a smaller one as well as the original. I'm using the advice at bakery.cakephp.org/articles/Perkster/ 2008/04/12/image-resizer-crop to call the function I have to do $this->PImage->resizeImage('resize', 'myimage.jpg', WWW_ROOT . 'img' . DS, false, false, 480) in the above the myimage.jpg bit I'd obviously want to replace with userphoto.jpg and the WWW_ROOT . 'img' . DS bit (which is supposed to be the folder where the image is) I'd want to presumably put files/ campaigns. My question simply is, how can I get from : $this->data['User']['image_url'] To having two vars, one with just the userphoto.jpg and the other with just the folder the image is in? I hope that makes sense, I'm new. I did try changing the PImage function so it only needed the value in $this->data['User'] ['image_url'] but that just caused lots of errors unsurprisingly. thanks in advance -- 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