ColdFusion Question

Thraxen

Diamond Member
Dec 3, 2001
4,683
1
81
I've got a form that allows files to be uploaded, but I've limited the files that can be uploaded based on the MIME type. Right now I check the MIME type upon upload using the "accept=" parameter in the "cffile" tag. This works except when an improper file type is uploaded the user gets an error screen . For example:

"The MIME type of the uploaded file (application/vnd.ms-excel) was not accepted by the server."

I would prefer to be able to handle this error more gracefully. Is there any way I could direct to a different page where I could explain the error? Or perhaps another way to handle this?

Thanks!



 

Furor

Golden Member
Mar 31, 2001
1,895
0
0
Have you tried putting a cftry/cfcatch block around the part that throws the error? Then, you can redirect to another page or display the error in a more user-friendly way.