Ryan,

As per Steve's suggestion have a look at the FixMacPost() function at
cflib.org (http://cflib.org/udf.cfm?ID=651)

David

-----Original Message-----
From: Steve Onnis [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 5:36 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: File upload on Mac


First off, you need to use TRIM when working with macs as it adds stuff to
the form values, so #TRIM(Form.theFile)#


So CF is probbalby look at "C:\WINNT\ACF393.tmp " rather than
"C:\WINNT\ACF393.tmp"

If your checking for anything in the form you need to use
#Len(Trim(Form.theFile))# to clear out the extra bytes

Steve

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ryan Sabir
Sent: Thursday, 12 June 2003 6:02 PM
To: CFAussie Mailing List
Subject: [cfaussie] File upload on Mac


Hi all,

Got a strange problem with uploading a file from a mac browser.

Uploading works fine, but in some cases I want to submit the form and
need to then detect whether the user actually selected a file or not.

Regarding the simple CF code I have reproduced below...

On the PC:
Submit the form with a file selected, the value of the 'Form.thefile'
variable is something like : "C:\WINNT\ACF393.tmp"
Submit the form below with no file selected and then 'Form.thefile' is
en empty string

On the Mac:
Submit the form with a file selected, the value of the 'Form.thefile'
variable is something like : "C:\WINNT\ACF393.tmp"
Submit the form below with no file selected and then 'Form.thefile' is
STILL something like : "C:\WINNT\ACF393.tmp"

How can I detect on the Mac if a file has been actually selected from
a file upload input box? There is no actual file created at the
location "C:\WINNT\ACF393.tmp" in either case, just to make things
fun.

CF code reproduced below (the file is called 'filetest.cfm'):

<CFIF isDefined("Form.fieldnames")>
<cfoutput>Thefile = [#Form.thefile#]</cfoutput>
</CFIF>
<form action="filetest.cfm" method="post" enctype="multipart/form-data">
<input type="file" name="thefile">
<input type="submit">
</form>

thanks

-----------------------
Ryan Sabir
Newgency Pty Ltd
2a Broughton St
Paddington 2021
Sydney, Australia
Ph (02) 9331 2133
Fax (02) 9331 5199
Mobile: 0411 512 454
http://www.newgency.com/index.cfm?referer=rysig


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to