[thelist] CFFILE exception handling
James Newbery
jamesnewbery at yahoo.co.uk
Thu Oct 24 06:58:01 CDT 2002
Listers,
I am setting up a document upload facility within an
content-management system. The upload itself is
working fine, but I am trying to get some
professional-looking exception handling.
I am limiting the mime-types allowed for upload. If a
user attempts to upload a different mime-type, an
error is correctly displayed. However, my generic
exception handler (below) is not being used by
Coldfusion. What am I missing here?
TIA,
Jim
The code:
<cftry>
<cffile action="upload"
filefield="upload_file"
destination="D:\testfolder\"
nameconflict="overwrite"
accept="application/msword,application/pdf,text/plain,image/jpeg,image/gif,text/html"
attributes="archive">
<cfcatch type="all">
<!--- exception code here, but is not being used by CF
--->
</cfcatch>
</cftry>
--------------- tip in advance!
<tip type="ColdFusion" author="James Newbery">
Getting a 'Permission Denied, Error 5' message when
using CFFILE in ColdFusion? Make sure your destination
attribute has a close forward slash, as below:
<cffile action="upload"
filefield="upload_field"
destination="c:\destination_folder\"
nameconflict="overwrite"
accept="text/plain">
</tip>
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
More information about the thelist
mailing list