From f2ba6ed9982ee4b3b80331a195534f74e510d508 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 3 Jan 2014 14:18:06 -0800 Subject: fix mimetype detection fallback --- include/attach.php | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/attach.php b/include/attach.php index 0c748cba6..3eb7a9366 100644 --- a/include/attach.php +++ b/include/attach.php @@ -79,17 +79,12 @@ function z_mime_content_type($filename) { if (array_key_exists($ext, $mime_types)) { return $mime_types[$ext]; } + + } -// 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'; - } + + return 'application/octet-stream'; + } -- cgit v1.2.3