My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
GuessContentType  
GuessContentType plugin
Phase-Implementation
Updated Oct 9, 2011 by evert...@gmail.com

Introduction

By default SabreDAV is not aware of any contenttypes of any files. This is because there is no reliable, portable and fast way to determine the contenttype/mimetype of files.

The GuessContentType plugin guesses the contenttype of files by doing what everybody else does; look at the extension.

If this plugin is added, it will only add a contenttype header/property for files that are recognized and don't already supply a contenttype themselves.

Note that GuessContentType is only available in version 1.1.0 and later.

Using GuessContentType

Add the plugin to your server.

$server->addPlugin(new Sabre_DAV_Browser_GuessContentType());

If you'd like to add more contenttypes, extend the Sabre_DAV_Browser_GuessContentType::$extensionMap property.


Sign in to add a comment
Powered by Google Project Hosting