s/mime_content_type/getMimeType/, fixes #633
This commit is contained in:
parent
15f0847434
commit
c0699ce236
@ -40,7 +40,7 @@ class MP3FileHandler extends DataHandlerExtension {
|
|||||||
$success = FALSE;
|
$success = FALSE;
|
||||||
|
|
||||||
if (file_exists($tmpname)) {
|
if (file_exists($tmpname)) {
|
||||||
$mimeType = mime_content_type($tmpname);
|
$mimeType = getMimeType($tmpname);
|
||||||
|
|
||||||
$success = ($mimeType == 'audio/mpeg');
|
$success = ($mimeType == 'audio/mpeg');
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ class VideoFileHandler extends DataHandlerExtension {
|
|||||||
$image->width = $size[0];
|
$image->width = $size[0];
|
||||||
$image->height = $size[1];
|
$image->height = $size[1];
|
||||||
|
|
||||||
switch (mime_content_type($filename)) {
|
switch (getMimeType($filename)) {
|
||||||
case "video/webm":
|
case "video/webm":
|
||||||
$image->ext = "webm";
|
$image->ext = "webm";
|
||||||
break;
|
break;
|
||||||
@ -167,7 +167,7 @@ class VideoFileHandler extends DataHandlerExtension {
|
|||||||
protected function check_contents(string $tmpname): bool {
|
protected function check_contents(string $tmpname): bool {
|
||||||
$success = FALSE;
|
$success = FALSE;
|
||||||
if (file_exists($tmpname)) {
|
if (file_exists($tmpname)) {
|
||||||
$mimeType = mime_content_type($tmpname);
|
$mimeType = getMimeType($tmpname);
|
||||||
|
|
||||||
$success = in_array($mimeType, [
|
$success = in_array($mimeType, [
|
||||||
'video/webm',
|
'video/webm',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user