Content Type not recongnized

  • Thread starter Thread starter shapper
  • Start date Start date
S

shapper

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
 
shapper said:
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.
 
How are you uploading it? What do you mean when you say you're uploading
a file "on a Web Application"?


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


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
 
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.
 
shapper said:
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.
 
Back
Top