Re: [Evolution] Opening pdf attachments




The critical bits are:

      Content-type: application/pdf; name="knutsonetal_NeuralPredictors.pdf";

and

      Content-type: application/octet-stream; name="application of real-time
fMRI.pdf"

You can see that the two attachments have different content types - it's
this that determines what applications are offered to deal with it.

      
I guess I don't understand what determines the MIME type of a pdf. From
what I see when investigating MIME types on the web, there should be a
close relationship between file type (eg, pdf) and mime type. I haven't
been able to find anything but cursory explanations of MIME types that
just link them with file types such as pdf.

The message mime structure is constructed by the application that
creates the message - it is at that point that the relationship between
the attachment type and "Content-type:" header is determined.  Clearly
in your case the originating mailer can determine what the first
attachment is, but fails to determine what the second one is
("application/octet-stream" is a generic default mime type that
basically just means "data of some form").

You should also be aware that the ".pdf" extension is not important -
using extensions to determine file type is something that was invented
by Microsoft in the DOS days - it is meaningless elsewhere and only used
by humans as a reminder what a file contains rather than the computer as
a determinant of the file type.

When a file is saved there is a different mechanism to the mime type
used to determine what the file contains - the command "file" looks
inside the files to try and determined what they contain.  It is usually
very good at it and it is the information that "file" provides that is
used to determine what is used to open it.



When I went to my wife's Mac (OS X 5) to see what it could tell me about
the pdfs that she sent to me, I couldn't fine anything at all about MIME
type in the "Get Info" for the documents. Each was just described as
"Kind: Portable Document Format," although they had different encoding
software indicated.

So there is a difference in the files at the sending side.

This, ultimately, is *not* an Evo problem - Evo is doing the correct
things with the information that is provided by the message.  It is a
problem at the sending end incorrectly putting in the information.  Some
may argue that given a generic "application/octet-stream" mime-type Evo
should try harder to guess the real file type (like I suspect TB soes),
but that is not something I would subscribe to.

P.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]