Hi Todd,

I won't run into a valid issue if the file is never uploaded to the server
in the first place. Basically the user submits the file, before the <cffile>
action I check the file name and see if it already exists in the database.
If it does, then I return the error. If it doesn't exist, then go and
perform the <cffile> action.

There's a way to do this in ASP.net by checking against the name of the file
field and the http header to grab the file name. I believe the control is
browser.httpheader {form.fieldname}

Kind regards,

Rick

-----Original Message-----
From: Todd Rafferty [mailto:[EMAIL PROTECTED] 
Sent: February-05-08 10:27 AM
To: CF-Talk
Subject: Re: File upload

You're still going to run into an "valid" issue where two completely
different videos have the same name.  When it comes to CMS, even if they're
dupes, they're valid.  The client is responsible for weeding out the
duplicates.  Just getting the name (in your instance), wouldn't do you any
good.  It's almost like you'd also want the MD5 checksum of the file as well
or something else.  There really is no way to determine if it's a duplicate
or not until it's on the server.  The name alone is not enough to go on.

On Feb 5, 2008 9:17 AM, Rick Sanders <[EMAIL PROTECTED]> wrote:

> Hello James,
>
> I want to grab the file name and query it in the database to see if it
> exists or not before the 15mb file is uploaded. This way, if the file
> exists, I can easily return an error and prompt the user to rename the
> file,
> or offer suggested names for the file.
>
> I've created a site for uploading videos, and there is a chance that 2
> people can upload a video with the same name, but the video is completely
> different. If I could bypass the upload and just check the name then this
> would save alot of time.
>
> Kind regards,
> 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:298201
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to