We have it working - try our code below. Add1.cfm is the form page and
add2.cfm is the action.

The issue we found was actually downloading the file once it is online but
Netscape 6+ on a Mac works ok so we set our application requirements to
exclude Netscape 4.x.

Tony Gruen


<!--- add1.cfm --->
<cfform action="add2.cfm" name="addfile" method="POST"
enctype="multipart/form-data">
<INPUT TYPE="file" NAME="FileName" SIZE="45" required="yes" tabindex="1"
message="You need to select a file to upload">
<INPUT TYPE="hidden" NAME="FileName_required" VALUE="You need to select a
file to upload!">
<input type="submit" name="submit" value="Add File" tabindex="4">
</cfform>

<!--- add2.cfm --->
<cfif IsDefined("Form.filename")>
        <cfif Len(trim(Form.filename))>

            <cftry>

                        <cffile destination="D:\Accounts\#session.programnumber#\"
action="upload" nameconflict="OVERWRITE" filefield="Filename">

                        <cfif cffile.filesize gt 0>
                                <cfset UploadedFile = 
"#URLEncodedFormat(cfFile.ServerFile)#">
                        </cfif>

                        <cfcatch type="Any">
                                <!-- cffile failed -->
                                <script language="JavaScript">
                                        alert("Sorry, \n unable to upload file.");
                                         history.go(-1);
                                </script>
                                <cfabort>
                                <cfexit>
                        </cfcatch>
                </cftry>

        </cfif>
<cfelse>
        <cflocation url="add1.cfm" addtoken="No">
</cfif>










-----Original Message-----
From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 1:40 PM
To: CF-Talk
Subject: MAC file upload


It seems like this was covered a few weeks ago but I can't find it.  Can
someone give me the quick low down on the trick for uploading files from a
MAC?

-mk

*******************************

I have a <CFFILE> question for you.
I am comparing results from a Mac and a Windows machine.
On the windows machine, the file works great, for adding and updating files.

On a Mac (G-3) using Netscape 4.76 and IE 5, I get the following error:
___________________________________________________________
Error Diagnostic Information

 Error in CFFILE tag

 The form field specified in the CFFILE tag (FOODFILENAME) does not contain
an uploaded file. Please be sure that you have specified the correct form
 field name.

 The error occurred while processing an element with a general identifier of
(CFFILE), occupying document position (1:1) to (4:26).



______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to