From d54042dd3898c5f4f0bc67df576484c6d25c86b2 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 28 Jan 2012 12:09:17 -0800 Subject: mime_content_type requires access to the file, not just the name --- mod/wall_attach.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'mod') diff --git a/mod/wall_attach.php b/mod/wall_attach.php index a66ed0d05..ecf475291 100755 --- a/mod/wall_attach.php +++ b/mod/wall_attach.php @@ -61,8 +61,6 @@ function wall_attach_post(&$a) { $filedata = @file_get_contents($src); $mimetype = z_mime_content_type($filename); - if(((! strlen($mimetype)) || ($mimetype === 'application/octet-stream')) && function_exists('mime_content_type')) - $mimetype = mime_content_type($filename); $hash = random_string(); $created = datetime_convert(); $r = q("INSERT INTO `attach` ( `uid`, `hash`, `filename`, `filetype`, `filesize`, `data`, `created`, `edited`, `allow_cid`, `allow_gid`,`deny_cid`, `deny_gid` ) -- cgit v1.2.3