Sorry, I think I wrote my first message poorly.
My problem is that when the user uploads the wrong mime-type CFFile spits
out an error.
Right Now, I am using CFTry to catch that error. However, this only works
after the file is uploaded because it is uploaded as a .tmp file. After
that, I can query the variable file.serverfile to see what the file was, I
would like to be able to validate it before the user uploads it to save the
transfer hassle of uploading a bad file.
I hope this makes this clearer, its still early here and I haven't finished
my first cup of go-go juice yet....
thanks again,
Ethan
----- Original Message -----
From: "David E. Crawford" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 9:40 AM
Subject: Re: CFile (another question while we're all on topic!)
> You can specify a list of accepted MIME types in the CFFILE tag. Keep in
> mind that it is the browser that reports this information to the server,
and
> sometimes it gets it wrong. And the MacIntosh is notorious for not
reporting
> properly.
>
> DC
>
> ----- Original Message -----
> From: "Ethan Rosch" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, February 19, 2001 09:34
> Subject: CFile (another question while we're all on topic!)
>
>
> > Is there a way to verify the mime type of a file before the user clicks
> submit on the form?
> >
> > Such that if it is an incorrect mime type, we can call an error?
> >
> > I don't think you can check the form field because it creates a .tmp
file
> as its value and by the time you can call a server variable, it's too
late!
> >
> > Thanks,
> >
> > Ethan
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists