aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-01-03 14:18:06 -0800
committerfriendica <info@friendica.com>2014-01-03 14:18:06 -0800
commitf2ba6ed9982ee4b3b80331a195534f74e510d508 (patch)
treec2aa75ce5c369e9aab12f21dd26121ba98095633
parent475b24ca9e758b257bde6f81c727178ae8b64bec (diff)
downloadvolse-hubzilla-f2ba6ed9982ee4b3b80331a195534f74e510d508.tar.gz
volse-hubzilla-f2ba6ed9982ee4b3b80331a195534f74e510d508.tar.bz2
volse-hubzilla-f2ba6ed9982ee4b3b80331a195534f74e510d508.zip
fix mimetype detection fallback
-rw-r--r--include/attach.php15
1 files changed, 5 insertions, 10 deletions
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';
+
}