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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user