Problems uploading text file in CF

2007-02-09 Thread hussain shaikh
I am trying to upload a text file using CF, but I get the following error.
The MIME type of the uploaded file text/plain was not accepted by the 
server.
My coldfusion is running on Unix platform.
The code which I m usiing is as follows:-

!--- Windows Example ---
!--- Check to see if the Form variable exists. ---
cfif isDefined(Form.FileContents) 
   !--- If TRUE, upload the file. ---
   cffile action = upload
  fileField = FileContents
  destination = /trpt/home/TRPT/cfm_scripts/
  accept = text/html
  nameConflict = MakeUnique
cfelse
   !--- If FALSE, show the Form. ---
   form method=post action=cfoutput#cgi.script_name#/cfoutput
  name=uploadForm enctype=multipart/form-data
  input name=FileContents type=file
  br
  input name=submit type=submit value=Upload File
   /form
/cfif

Please help!!!

Hussain.

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269289
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Problems uploading text file in CF

2007-02-09 Thread Bob Imperial
Sounds like you need set permissions ... Take a peek at:
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p35.htm#wp354009
1 this should get you there.

Bob 

-Original Message-
From: hussain shaikh [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 09, 2007 8:04 AM
To: CF-Talk
Subject: Problems uploading text file in CF

I am trying to upload a text file using CF, but I get the following error.
The MIME type of the uploaded file text/plain was not accepted by the
server.
My coldfusion is running on Unix platform.
The code which I m usiing is as follows:-

!--- Windows Example ---
!--- Check to see if the Form variable exists. --- cfif
isDefined(Form.FileContents) 
   !--- If TRUE, upload the file. ---
   cffile action = upload
  fileField = FileContents
  destination = /trpt/home/TRPT/cfm_scripts/
  accept = text/html
  nameConflict = MakeUnique
cfelse
   !--- If FALSE, show the Form. ---
   form method=post action=cfoutput#cgi.script_name#/cfoutput
  name=uploadForm enctype=multipart/form-data
  input name=FileContents type=file
  br
  input name=submit type=submit value=Upload File
   /form
/cfif

Please help!!!

Hussain.



~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269291
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Problems uploading text file in CF

2007-02-09 Thread Steve Brownlee
Well, look at your ACCEPT attribute.  You have it set to text/html, so
it won't accept any other MIME type.  You need to add text/plain so
that list if you want to upload files of that type.


Steve Brownlee
http://www.fusioncube.net/


-Original Message-
From: hussain shaikh [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 09, 2007 8:04 AM
To: CF-Talk
Subject: Problems uploading text file in CF

I am trying to upload a text file using CF, but I get the following
error.
The MIME type of the uploaded file text/plain was not accepted by the
server.
My coldfusion is running on Unix platform.
The code which I m usiing is as follows:-

!--- Windows Example ---
!--- Check to see if the Form variable exists. --- cfif
isDefined(Form.FileContents) 
   !--- If TRUE, upload the file. ---
   cffile action = upload
  fileField = FileContents
  destination = /trpt/home/TRPT/cfm_scripts/
  accept = text/html
  nameConflict = MakeUnique
cfelse
   !--- If FALSE, show the Form. ---
   form method=post action=cfoutput#cgi.script_name#/cfoutput
  name=uploadForm enctype=multipart/form-data
  input name=FileContents type=file
  br
  input name=submit type=submit value=Upload File
   /form
/cfif

Please help!!!

Hussain.

~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2  MX7 integration  create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269294
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4