My limited testing shows this won't work...

2011-08-18 Thread Rick Faircloth
Am I correct? The image upload, using makeunique can't be used in conjuction with reReplace as in: cffile action= upload filefield = image destination = #expandPath('images\')##reReplace(image, '[^a-zA-Z0-9_.]', '', 'all')# accept= image/jpg,

Re: My limited testing shows this won't work...

2011-08-18 Thread Leigh
At that stage, the server has already received the uploaded file. Action=upload just moves and/or renames the file. However, I still do not think it will work as you expect. #form.image# only contains a temporary file path at that point. The original/client file name is not available until

Re: My limited testing shows this won't work...

2011-08-18 Thread Pete Freitag
Rick, You want to make sure you upload into a temporary directory that is outside of the web root first, otherwise as Leigh pointed out the mime type could be spoofed, and the file could be executed before you've even had a chance to perform any other validation on it. The link got truncated in

RE: My limited testing shows this won't work...

2011-08-18 Thread Rick Faircloth
Thanks, Pete! I'll check out the link! Rick -Original Message- From: Pete Freitag [mailto:p...@foundeo.com] Sent: Thursday, August 18, 2011 4:52 PM To: cf-talk Subject: Re: My limited testing shows this won't work... Rick, You want to make sure you upload into a temporary directory