mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 20:43:25 +00:00
@@ -40,8 +40,6 @@ class MimeGuesserConfiguration
|
||||
$guesser->register(new AudioMimeTypeGuesser());
|
||||
$guesser->register(new VideoMimeTypeGuesser());
|
||||
|
||||
$guesser->register(new AlchemyMimeTypeGuesser());
|
||||
|
||||
if ($this->conf->isSetup()) {
|
||||
$conf = $this->conf->getConfig();
|
||||
|
||||
|
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Phrasea\Media;
|
||||
|
||||
use Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface;
|
||||
|
||||
class MimeTypeGuesser implements MimeTypeGuesserInterface
|
||||
{
|
||||
public static $mimeTypes = array(
|
||||
'mpeg' => 'video/mpeg',
|
||||
'mpg' => 'video/mpeg',
|
||||
'mov' => 'video/quicktime',
|
||||
'dv' => 'video/x-dv',
|
||||
'xls' => 'application/vnd.ms-excel',
|
||||
'doc' => 'application/msword',
|
||||
'ppt' => 'application/vnd.ms-powerpoint',
|
||||
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
);
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function guess($path)
|
||||
{
|
||||
$extension = strtolower(pathinfo($path, PATHINFO_EXTENSION));
|
||||
|
||||
if (array_key_exists($extension, static::$mimeTypes)) {
|
||||
return static::$mimeTypes[$extension];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user