I remembered reading something like it in Ben Forta's book (CFMX7 Web
Application Construction Kit) and I went back and searched. This is what
I found:

" ...illustrates one of Internet Explorer 6's policies. Unlike most
other browsers, it thinks the file
extension-and the format of the actual content itself-is more important
than the specified content
type. The content type considered only if the file extension doesn't
have an associated program, or
when there is no file extension.

To get consistent behavior with IE, add a content-disposition header to
the page request, using a
<cfheader> tag, such as the following. The <cfheader> tag is the way
ColdFusion enables you to
send custom HTTP headers back to the browser, along with the content
your template generates.
You would add this line right before the <cfcontent> line in Listing
33.3:
<cfheader
name="Content-Disposition"
value="filename=films">"

So, I guess you can use Content-Disposition tag somewhere? I am not
exactly sure though..Just a thought.

Regards,
Pine

-----Original Message-----
From: Deanna Schneider [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 06, 2006 1:13 PM
To: CF-Talk
Subject: Re: PDF Upload Problems


I don't personally have a pdf generator, but I can reproduce it with an
excel file, for example. It only happens with IE, though - Firefox
correctly figures out the mime type. But, if you open an excel file with
Microsoft Excel, and then try to upload it via your web page and IE,
you'll discover that it thinks it's an application/octet-stream.


On 3/6/06, Mike Chabot <[EMAIL PROTECTED]> wrote:
>
> Deanna,
> Thank you for the information. Is there a way to reproduce this 
> problem, since I cannot seem to do so?
>
> I did some further testing and it appears that CFMX, for the most 
> part, is determining the MIME-type from the file extension, since I am

> able to add .pdf to any file type to get it past the application/pdf 
> mime type restriction.
>
> Thank you,
> Mike Chabot
>
> On 3/6/06, Deanna Schneider <[EMAIL PROTECTED]> wrote:
> > Application/octet-stream is what you'll get if the pdf is open on 
> > their system when they try to upload it. I don't know of a really 
> > great work around, other than catching that particular error and 
> > telling them to be sure to close it before uploading it.
> >
> > On 3/6/06, Mike Chabot <[EMAIL PROTECTED]> wrote:
> > >
> > > We have a file upload form that only accepts PDF files. A very 
> > > small percentage of people have tried to upload files that end in 
> > > ".pdf," but CFMX 6.1 rejects them because they have MIME types of 
> > > "application/octet-stream" or "application/unknown." Since these 
> > > files could not be uploaded, I am not sure if these files are 
> > > legitimate PDFs, so I would like to know if anyone else has 
> > > experience with this, or if there is some advice I can give to the

> > > people experiencing these problems? At what stage of the upload 
> > > process does the MIME-type get associated with the file?
> > >
> > > Thank you,
> > > Mike Chabot
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234491
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to