Smart renames on images?

2000-10-23 Thread Jamie Keane

Hi folks,

I've got a project that requires that all images that are uploaded are named
uniquely.  This would usually be a simple case of using the MAKEUNIQUE
attribute in CFFILE but the client is picky about the names of the incoming
files.  Therefore, the original name must be preserved.  If the desired
filename already exists on the server, I need to let the user know, and
rename the file accordingly.  What's the easiest and most efficent way to
handle this?

--
Jamie Keane
Programmer
SolutionMasters, Inc.
9111 Monroe Rd., Suite 100
Charlotte, NC  28270
www.solutionmasters.com
704.563.5559 x 228  Voice
704.849.9291  Fax


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Smart renames on images?

2000-10-23 Thread Robert Everland

I'd say run a check first so if the name is taken have the user rename the
file themself, if not you'll have to write sometime where it is the name of
the file plus a number or something like that.



Robert Everland III
Web Developer
Dixon Ticonderoga


-Original Message-
From: Jamie Keane [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 23, 2000 11:29 AM
To: CF-Talk
Subject: Smart renames on images?


Hi folks,

I've got a project that requires that all images that are uploaded are named
uniquely.  This would usually be a simple case of using the MAKEUNIQUE
attribute in CFFILE but the client is picky about the names of the incoming
files.  Therefore, the original name must be preserved.  If the desired
filename already exists on the server, I need to let the user know, and
rename the file accordingly.  What's the easiest and most efficent way to
handle this?

--
Jamie Keane
Programmer
SolutionMasters, Inc.
9111 Monroe Rd., Suite 100
Charlotte, NC  28270
www.solutionmasters.com
704.563.5559 x 228  Voice
704.849.9291  Fax



Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a
message with 'unsubscribe' in the body to [EMAIL PROTECTED]

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Smart renames on images?

2000-10-23 Thread Mike Connolly

CFTRY and CFCATCH to capture the 'file already exists' error

 -Original Message-
 From: Jamie Keane [SMTP:[EMAIL PROTECTED]]
 Sent: 23 October 2000 16:29
 To:   CF-Talk
 Subject:  Smart renames on images?
 
 Hi folks,
 
 I've got a project that requires that all images that are uploaded are
 named
 uniquely.  This would usually be a simple case of using the MAKEUNIQUE
 attribute in CFFILE but the client is picky about the names of the
 incoming
 files.  Therefore, the original name must be preserved.  If the desired
 filename already exists on the server, I need to let the user know, and
 rename the file accordingly.  What's the easiest and most efficent way to
 handle this?
 
 --
 Jamie Keane
 Programmer
 SolutionMasters, Inc.
 9111 Monroe Rd., Suite 100
 Charlotte, NC  28270
 www.solutionmasters.com
 704.563.5559 x 228  Voice
 704.849.9291  Fax
 
 --
 --
 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
 a message with 'unsubscribe' in the body to
 [EMAIL PROTECTED]


---
Any opinions expressed in this message are those of the individual and not necessarily 
the company.  This message and any files transmitted with it are confidential and 
solely for the use of the intended recipient.  If you are not the intended recipient 
or the person responsible for delivering to the intended recipient, be advised that 
you have received this message in error and that any use is strictly prohibited.

Sapphire Technologies Ltd
http://www.sapphire.net

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Smart renames on images?

2000-10-23 Thread Cameron Childress

 I've got a project that requires that all images that are
 uploaded are named
 uniquely.  This would usually be a simple case of using the MAKEUNIQUE
 attribute in CFFILE but the client is picky about the names of
 the incoming
 files.  Therefore, the original name must be preserved.  If the desired
 filename already exists on the server, I need to let the user know, and
 rename the file accordingly.  What's the easiest and most efficent way to
 handle this?

Do they have to be names correctly on the server, or just when they are
downloaded back to the client again?  There are different filename two
parameters which would help you do that.  File.ServerFile is the unique name
on the server, but File.ClientFile is the original name of the file before
it was made unique.  You can always store BOTH these names in the DB so that
you can preserve the filename in listings and such in the application.  If a
file is downloaded out of the app, you can also apply the original name back
again to fake out the users into thinking it was always named that on the
server.

If they actually need it to be named correctly on the server itself (boy
that is picky), then you'll want to read up no the NAMECONFLICT="Error"
attribute of the CFFILE tag.  You should be able to use this along with
CFTRY/CFCASE to handle the error and give the user some options on renaming
it.

-Cameron


Cameron Childress
ElliptIQ Inc.
p.770.460.7277.232
f.770.460.0963


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



Re: Smart renames on images?

2000-10-23 Thread Jamie Keane

What type of error is returned from an unsuccessful upload?

--
Jamie Keane
Programmer
SolutionMasters, Inc.
9111 Monroe Rd., Suite 100
Charlotte, NC  28270
www.solutionmasters.com
704.563.5559 x 228  Voice
704.849.9291  Fax
-Original Message-
From: Cameron Childress [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Monday, October 23, 2000 11:35 AM
Subject: RE: Smart renames on images?


 I've got a project that requires that all images that are
 uploaded are named
 uniquely.  This would usually be a simple case of using the MAKEUNIQUE
 attribute in CFFILE but the client is picky about the names of
 the incoming
 files.  Therefore, the original name must be preserved.  If the desired
 filename already exists on the server, I need to let the user know, and
 rename the file accordingly.  What's the easiest and most efficent way to
 handle this?

Do they have to be names correctly on the server, or just when they are
downloaded back to the client again?  There are different filename two
parameters which would help you do that.  File.ServerFile is the unique
name
on the server, but File.ClientFile is the original name of the file before
it was made unique.  You can always store BOTH these names in the DB so
that
you can preserve the filename in listings and such in the application.  If
a
file is downloaded out of the app, you can also apply the original name
back
again to fake out the users into thinking it was always named that on the
server.

If they actually need it to be named correctly on the server itself (boy
that is picky), then you'll want to read up no the NAMECONFLICT="Error"
attribute of the CFFILE tag.  You should be able to use this along with
CFTRY/CFCASE to handle the error and give the user some options on renaming
it.

-Cameron


Cameron Childress
ElliptIQ Inc.
p.770.460.7277.232
f.770.460.0963


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]



RE: Smart renames on images?

2000-10-23 Thread Cameron Childress

 What type of error is returned from an unsuccessful upload?

I'm not sure.  I would suggest you try them all at once and see which one
trips.

-Cameron


Cameron Childress
ElliptIQ Inc.
p.770.460.7277.232
f.770.460.0963


Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]