Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Internet Explorer May Not Use the Expected MIME Type for Uploaded Files


View products that this article applies to.

Symptoms

When you use Internet Explorer to upload (or post) a file to a Web server by using a form on a Web page, the file may not be uploaded with the expected MIME type. (The MIME type is also known as the content type or the media type.) For example, if you upload an .asx file (a Microsoft Windows Media audio or video playlist), a network trace may show that the Content-type header used is "text/html" instead of "video/x-ms-asf." For example, a typical abstract of a network trace may contain data that is similar to this:
POST /upload.asp 
Content-Type: multipart/form-data;
... 
-----------------------------7d3376d1b08bc 
Content-Disposition: form-data; 
name="filUpload"; 
filename="C:\example.asx" 
Content-Type : text/html
This behavior may be a problem for receiving programs that rely on the Content-type header to process the uploaded file.

↑ Back to the top


Cause

An .asx file is typically a plain-text file that contains XML or HTML tags. A text file that contains any of the following tags is assigned a MIME type of "text/html" by Internet Explorer:
<?XML>
<A HREF>
<BODY>
<HEAD>
<HTML>
<IMG>
<PLAINTEXT>
<PRE>
<SCRIPT>
<TABLE>
<TITLE>
The MIME type that is detected by Internet Explorer for .asx files is frequently "text/html" because .asx files typically contain text and HTML tags such as <TITLE>.

Internet Explorer examines the actual contents that are associated with a local file to determine the MIME type. If the contents of the file do not permit Internet Explorer to determine the MIME type, the file name extension and associations or registered programs are used to determine the MIME type.

↑ Back to the top


More information

Form-based file upload in HTML is described in Request for Comments (RFC) document 1867. To view this document, visit the following Internet Engineering Task Force (IETF) Web site: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

For additional information about MIME-type detection in Internet Explorer, visit the following Microsoft Web site:

↑ Back to the top


Keywords: KB815455, kbprb

↑ Back to the top

Article Info
Article ID : 815455
Revision : 8
Created on : 5/23/2007
Published on : 5/23/2007
Exists online : False
Views : 245