1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

some fixes to be committed.

git-svn-id: file:///svn/phpbb/trunk@6975 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-02-09 14:24:34 +00:00
parent 56a93bdfdd
commit 7216ffe8be
9 changed files with 54 additions and 32 deletions

View File

@@ -561,7 +561,20 @@ class fileupload
{
$_FILES[$form_name]['name'] = basename($source_file);
$_FILES[$form_name]['size'] = 0;
$_FILES[$form_name]['type'] = '';
$mimetype = '';
if (function_exists('mime_content_type'))
{
$mimetype = mime_content_type($filename);
}
// Some browsers choke on a mimetype of application/octet-stream
if (!$mimetype || $mimetype == 'application/octet-stream')
{
$mimetype = 'application/octetstream';
}
$_FILES[$form_name]['type'] = $mimetype;
}
else
{