How would one use the cffile tag to dynamically rename any file to
replace spaces with underscores.
Example, user uploads a file called "photo 1.jpg" but I want to change
the space to an underscore, and save the file as photo_1.jpg.
I have the form that uploads OK, I just don't know how to change the
space to an underscore in the filename before saving. I've looked at
using #replace but can't get it right.
Thanks!
allen@oysterweb.com - 30 Sep 2005 14:29 GMT
I think there are multiple issues trying to rename the file prior to
saving.
I would suggest simply saving the file, then renaming it to the format
you want.