Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

Added MIME Types #64

Merged
merged 1 commit into from
Jul 9, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.AspNet.StaticFiles
/// </summary>
public class FileExtensionContentTypeProvider : IContentTypeProvider
{
#region Extension mapping table
#region Extension mapping table
/// <summary>
/// Creates a new provider with a set of default mappings.
/// </summary>
Expand All @@ -38,6 +38,7 @@ public FileExtensionContentTypeProvider()
{ ".aif", "audio/x-aiff" },
{ ".aifc", "audio/aiff" },
{ ".aiff", "audio/aiff" },
{ ".appcache", "text/cache-manifest" },
{ ".application", "application/x-ms-application" },
{ ".art", "image/x-jg" },
{ ".asd", "application/octet-stream" },
Expand Down Expand Up @@ -143,6 +144,7 @@ public FileExtensionContentTypeProvider()
{ ".jpeg", "image/jpeg" },
{ ".jpg", "image/jpeg" },
{ ".js", "application/javascript" },
{ ".json", "application/json" },
{ ".jsx", "text/jscript" },
{ ".latex", "application/x-latex" },
{ ".lit", "application/x-ms-reader" },
Expand Down Expand Up @@ -310,7 +312,8 @@ public FileExtensionContentTypeProvider()
{ ".trm", "application/x-msterminal" },
{ ".ts", "video/vnd.dlna.mpeg-tts" },
{ ".tsv", "text/tab-separated-values" },
{ ".ttf", "application/octet-stream" },
{ ".ttc", "application/x-font-ttf" },
{ ".ttf", "application/x-font-ttf" },
{ ".tts", "video/vnd.dlna.mpeg-tts" },
{ ".txt", "text/plain" },
{ ".u32", "application/octet-stream" },
Expand All @@ -334,6 +337,7 @@ public FileExtensionContentTypeProvider()
{ ".wcm", "application/vnd.ms-works" },
{ ".wdb", "application/vnd.ms-works" },
{ ".webm", "video/webm" },
{ ".webp", "image/webp" },
{ ".wks", "application/vnd.ms-works" },
{ ".wm", "video/x-ms-wm" },
{ ".wma", "audio/x-ms-wma" },
Expand Down Expand Up @@ -393,7 +397,7 @@ public FileExtensionContentTypeProvider()
})
{
}
#endregion
#endregion

/// <summary>
/// Creates a lookup engine using the provided mapping.
Expand Down Expand Up @@ -431,4 +435,4 @@ public bool TryGetContentType(string subpath, out string contentType)
return Mappings.TryGetValue(extension, out contentType);
}
}
}
}