[thelist] CFFILE exception handling

Raymond Camden jedimaster at macromedia.com
Thu Oct 24 07:22:01 CDT 2002


Don't use type="all", use type="any" - OR use the specific type. To
figure out the specific type, change it to type="any", and then dump
cfcatch. You will see the specific type there.

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire

Email    : jedimaster at macromedia.com
WWW      : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda

> -----Original Message-----
> From: thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org] On Behalf Of James Newbery
> Sent: Thursday, October 24, 2002 7:58 AM
> To: thelist at lists.evolt.org
> Subject: [thelist] CFFILE exception handling
>
>
> 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/jp
> eg,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
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list