Phill,

In your action page you can specify what types of files to accept.

For example:

<CFFILE
FILEFIELD="file2Upload"
NAMECONFLICT="OVERWRITE"
DESTINATION ="C:\Inetpub\wwwroot\files\"
ACTION = "UPLOAD"
ACCEPT = "image/gif, image/jpeg, application/doc, etc..."
>

hth,

A T Nelson
Senior Developer
MLM World News Today
"Linking you to the World"
(619) 584-3100 ext. 217


----Original Message Follows----
From: "Phill Gibson" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: CF-Talk <[EMAIL PROTECTED]>
Subject: File upload question
Date: Wed, 08 Aug 2001 12:34:31 -0500
Received: from [207.31.122.190] by hotmail.com (3.2) with ESMTP id 
MHotMailBD3AC4220064400431D9CF1F7ABE04F00; Wed, 08 Aug 2001 10:38:51 -0700
Received: from hof001.cfhosting.net ([207.31.122.190])          by 
hof001.houseoffusion.com (Post.Office MTA v3.5.3 release 223          ID# 
0-54969U100L100S0V35) with ESMTP id com          for 
<[EMAIL PROTECTED]>;          Wed, 8 Aug 2001 13:39:32 -0400
>From [EMAIL PROTECTED] Wed, 08 Aug 2001 10:38:54 -0700
message-id: <[EMAIL PROTECTED]>
precedence: bulk

Hi everyone,

I'm doing a file upload using standard HTML with the following form:

<form name="upload" action="processUpload.cfm" method="post"
enctype="multipart/form-data">
          <input type="file" name="file2Upload" size="40"><br>
          <input type="submit" value="Upload This File">
</form>

but it only reads the file contents if the file has a ".txt" extension. I
can rename an ASCII file from a different extension to .txt, and it works.

Does anyone know how to specify a file extension other than .txt and have it
work?

Thanks,
Phill Gibson
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to