Namespace: ITHit.WebDAV.Server
The MimeType type exposes the following members.
Name | Description | |
---|---|---|
ExtendTypesTable |
Extends the list of content types or replaces existing value with a new one.
| |
GetMimeType |
Returns the mime type corresponding to file extension.
|
The GetMimeType(String) static method of this class returns mime type by provided file extension. The class is usually utilized in ContentType implementation. The mime-type is returned in a Content-Type header with GET request. The set of values can be extended with using ExtendTypesTable(String, String) method.
When deciding which action to perform when downloading a file some WebDAV clients and browsers (such as Internet Explorer) rely on file extension, while others (such as Firefox) rely on Content-Type header returned by server. For identical behavior in all browsers and WebDAV clients your server must return a correct mime-type with a requested file.
The code below is part of 'WebDAVServer.FileSystemStorage.AspNet' C# & VB samples provided with the SDK.