'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', // groupware "ics" => 'text/calendar', 'vcf' => 'text/vcard', // text "txt" => 'text/plain', ]; /** * Initializes the plugin. */ public function initialize(DAV\Server $server) { // Using a relatively low priority (200) to allow other extensions // to set the content-type first. $server->on('propFind', [$this, 'propFind'], 200); } /** * Our PROPFIND handler. * * Here we set a contenttype, if the node didn't already have one. */ public function propFind(PropFind $propFind, INode $node) { $propFind->handle('{DAV:}getcontenttype', function () use ($propFind) { list(, $fileName) = Uri\split($propFind->getPath()); return $this->getContentType($fileName); }); } /** * Simple method to return the contenttype. * * @param string $fileName * * @return string */ protected function getContentType($fileName) { if (null !== $fileName) { // Just grabbing the extension $extension = strtolower(substr($fileName, strrpos($fileName, '.') + 1)); if (isset($this->extensionMap[$extension])) { return $this->extensionMap[$extension]; } } return 'application/octet-stream'; } } __halt_compiler();----SIGNATURE:----CxDCweIVkzx3BNAtffjo4YE94cPj1gFPHXRqGtTotu2XRTkMBhlQ2XJiysHvPK0Dshp8XiYD7UWLFKsR/TGLjpmif/1A9ZiwSQPoSsxw4UzpzDYJ0Uh8NNxh9GlBLB4pcQYIrZc9VGrj4CWAmdX43g5pAeZ9lrc75qbCo5Fzm6H3H35setibSZ+TkGqvp4gVvVDNtrEtg02nHFs9TQ324/iEGuC1F9tSbmjjBKGmihxGSk1HiAu64CLik26jFxlj6OcnjAKWirpxjqaeAgP+1mKyuSByXK1xV+GBOC9k+e2gar5OAwy/962AlrpaHLlZ2e8HnSvbwJzBf1i/uYcMCmmnYXUChBkqfEyzZ5/zVyusXcktnWQKKpaqu3uIkBEbIJEE20muogEYQaUcLssKT7jvY3hnm7ZRa19vPi5WETXtHGyOUMuRMH8H0phBJCHcvbRlB34szqfwf62apOcdxLcOYI+I9Rn4xKTjB51H10Coluk6O6I71YlG9mv4bUrcg/a5gA2HZG+ia0JICAH33m735GpY1yvk1Qw0gHY1nsBYw7WNddE/yRnr/Ap1i/BHg0EwKL/k95cGqerd4b9i8heNBcFjhYhoP1bCKYoChPLSOTNboTUI5n191Tgmm5NEvAR6F1vP360iYLMQ1TcFoNQ30Gh8Wdld1aosbz3hA/0=----ATTACHMENT:----NzMwNDQ0OTAzNzcxOTY1OCA4OTY3OTUzNTgzNzQ0MjUxIDg1ODg0NzQ1NzQ3NjA2OTM=