From: shapper on
Hello,

I am uploading a file on a Web Application which is a PDF document.

However, for the content type I get "application/octet-stream" instead
of "application/pdf".

Do I need to install Adobe Acrobat Reader on the system so that a PDF
file is recongnized?

Thanks,

Miguel
From: Harlan Messinger on
shapper wrote:
> Hello,
>
> I am uploading a file on a Web Application which is a PDF document.

How are you uploading it? What do you mean when you say you're uploading
a file "on a Web Application"?

> However, for the content type I get "application/octet-stream" instead
> of "application/pdf".

What do you mean by you "get" it? From where? Where is this being indicated?

> Do I need to install Adobe Acrobat Reader on the system so that a PDF
> file is recongnized?

The question doesn't seem to be one of recognition but of configuration.
But I can't tell you how without more specific information.

From: shapper on
On Jun 18, 4:00 pm, Harlan Messinger
<hmessinger.removet...(a)comcast.net> wrote:
> shapper wrote:
> > Hello,
>
> > I am uploading a file on a Web Application which is a PDF document.
>
> How are you uploading it? What do you mean when you say you're uploading
> a file "on a Web Application"?
>
> > However, for the content type I get "application/octet-stream" instead
> > of "application/pdf".
>
> What do you mean by you "get" it? From where? Where is this being indicated?
>
> > Do I need to install Adobe Acrobat Reader on the system so that a PDF
> > file is recongnized?
>
> The question doesn't seem to be one of recognition but of configuration.
> But I can't tell you how without more specific information.

I am working on Windows 7 and I am debugging a web application.

After some test I realized that when I upload a PDF file using IE the
Content Type is "application/pdf".

When using Firefox the content type is "application/octet-stream".

The variable containing the file is a Stream.

Isn't this strange?

I mean shouldn't all mime types be available to all browsers on a
system?

Thanks,
Miguel
From: Jeff Johnson on
"shapper" <mdmoura(a)gmail.com> wrote in message
news:999d584c-4aa6-4f6a-9c74-a0a3e7e54815(a)j4g2000yqh.googlegroups.com...

> I am working on Windows 7 and I am debugging a web application.

> After some test I realized that when I upload a PDF file using IE the
> Content Type is "application/pdf".

> When using Firefox the content type is "application/octet-stream".

> The variable containing the file is a Stream.

> Isn't this strange?

> I mean shouldn't all mime types be available to all browsers on a
> system?

It sounds like you shouldn't be relying on the browser to supply the correct
MIME type but should instead either examine the file's extension or try to
determine the file type by looking at the bytes. Preferably both.


From: Harlan Messinger on
shapper wrote:
> On Jun 18, 4:00 pm, Harlan Messinger
> <hmessinger.removet...(a)comcast.net> wrote:
>> shapper wrote:
>>> Hello,
>>> I am uploading a file on a Web Application which is a PDF document.
>> How are you uploading it? What do you mean when you say you're uploading
>> a file "on a Web Application"?
>>
>>> However, for the content type I get "application/octet-stream" instead
>>> of "application/pdf".
>> What do you mean by you "get" it? From where? Where is this being indicated?
>>
>>> Do I need to install Adobe Acrobat Reader on the system so that a PDF
>>> file is recongnized?
>> The question doesn't seem to be one of recognition but of configuration.
>> But I can't tell you how without more specific information.
>
> I am working on Windows 7 and I am debugging a web application.
>
> After some test I realized that when I upload a PDF file using IE the
> Content Type is "application/pdf".
>
> When using Firefox the content type is "application/octet-stream".

You still haven't said how you are uploading the file (using an input
tag with type="file"? some other means) or how you are determining what
the content type is.

> The variable containing the file is a Stream.
>
> Isn't this strange?
>
> I mean shouldn't all mime types be available to all browsers on a
> system?

Availability doesn't have anything to do with it. If a sender
transmitting a stream or a recipient receiving a stream hasn't been told
what the content type is, it has to make its own decision, correct? And
two browsers by two different organizations aren't necessarily going to
make the same decision.