X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fattach.php;h=6d611cec0418534ce50f80bae09c0c3d7189587f;hb=64d0616762efcff413a335f2fdde4d8219d44895;hp=4001d2af1351bd7f92714ad3263357365b3eee46;hpb=bdf42473a0341f291cd256323d122aa80bb0cb0b;p=friendica.git diff --git a/include/attach.php b/include/attach.php old mode 100644 new mode 100755 index 4001d2af13..6d611cec04 --- a/include/attach.php +++ b/include/attach.php @@ -38,6 +38,7 @@ function z_mime_content_type($filename) { // audio/video 'mp3' => 'audio/mpeg', + 'wav' => 'audio/wav', 'qt' => 'video/quicktime', 'mov' => 'video/quicktime', 'ogg' => 'application/ogg', @@ -68,12 +69,13 @@ function z_mime_content_type($filename) { return $mime_types[$ext]; } } - elseif (function_exists('finfo_open')) { - $finfo = finfo_open(FILEINFO_MIME); - $mimetype = finfo_file($finfo, $filename); - finfo_close($finfo); - return $mimetype; - } +// can't use this because we're just passing a name, e.g. not a file that can be opened +// elseif (function_exists('finfo_open')) { +// $finfo = @finfo_open(FILEINFO_MIME); +// $mimetype = @finfo_file($finfo, $filename); +// @finfo_close($finfo); +// return $mimetype; +// } else { return 'application/octet-stream'; }