Use the attribute MakeUnique="Yes" (or is it "True" ?) to create a new filename if one exists with that filename already.
That was my point. You can have the system generate a unique filename for CF and the database to reference, but maintain the original filename in the database, too, to show on-screen. I do this all the time with Real Estate photos... Rick > -----Original Message----- > From: Rick Sanders [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 05, 2008 10:47 AM > To: CF-Talk > Subject: RE: File upload > > Hi Rick, > > It doesn't solve the problem though. Here's the problem: > > 1. User #1 uploads a file called "Movie.wmv". The file is uploaded to > site/videos/Movie.wmv. The file is referenced in the database in the video > file field " Movie.wmv ". > 2. User #55 also uploads a file called "Movie.wmv" which is a totally > different video in a totally different category. But, because it's named the > same, it overwrites the original "Movie.wmv" file, thus making both videos > the same. > > I need to check to see if the file exists before it's uploaded, or it'll > overwrite the existing video. > > My work-around is to upload the file to a temp location then check if the > file exists already. If not, move the file to the videos folder. If it does > exists, delete it from temp and return an error. > > Kind regards, > > Rick > > -----Original Message----- > From: Rick Faircloth [mailto:[EMAIL PROTECTED] > Sent: February-05-08 11:28 AM > To: CF-Talk > Subject: RE: File upload > > Why not have the user upload the file, rename it automatically if there is > a conflict for a name that is referred to within the database, but also > retain > the original filename in the database for display to users. > > Rick > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:298230 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

