| @@ 252-257 (lines=6) @@ | ||
| 249 | elseif (!empty($file['mime_type']) && (isset($_REQUEST['image']) || !in_array($file['fileext'], array('jpg', 'gif', 'jpeg', 'x-ms-bmp', 'png', 'psd', 'tiff', 'iff')))) |
|
| 250 | header('Content-Type: ' . strtr($file['mime_type'], array('image/bmp' => 'image/x-ms-bmp'))); |
|
| 251 | ||
| 252 | else |
|
| 253 | { |
|
| 254 | header('Content-Type: ' . (isBrowser('ie') || isBrowser('opera') ? 'application/octetstream' : 'application/octet-stream')); |
|
| 255 | if (isset($_REQUEST['image'])) |
|
| 256 | unset($_REQUEST['image']); |
|
| 257 | } |
|
| 258 | ||
| 259 | // Convert the file to UTF-8, cuz most browsers dig that. |
|
| 260 | $utf8name = !$context['utf8'] && function_exists('iconv') ? iconv($context['character_set'], 'UTF-8', $file['filename']) : (!$context['utf8'] && function_exists('mb_convert_encoding') ? mb_convert_encoding($file['filename'], 'UTF-8', $context['character_set']) : $file['filename']); |
|
| @@ 1673-1678 (lines=6) @@ | ||
| 1670 | elseif (!empty($mime_type) && (isset($_REQUEST['image']) || !in_array($file_ext, array('jpg', 'gif', 'jpeg', 'x-ms-bmp', 'png', 'psd', 'tiff', 'iff')))) |
|
| 1671 | header('Content-Type: ' . strtr($mime_type, array('image/bmp' => 'image/x-ms-bmp'))); |
|
| 1672 | ||
| 1673 | else |
|
| 1674 | { |
|
| 1675 | header('Content-Type: ' . (isBrowser('ie') || isBrowser('opera') ? 'application/octetstream' : 'application/octet-stream')); |
|
| 1676 | if (isset($_REQUEST['image'])) |
|
| 1677 | unset($_REQUEST['image']); |
|
| 1678 | } |
|
| 1679 | ||
| 1680 | // Convert the file to UTF-8, cuz most browsers dig that. |
|
| 1681 | $utf8name = !$context['utf8'] && function_exists('iconv') ? iconv($context['character_set'], 'UTF-8', $real_filename) : (!$context['utf8'] && function_exists('mb_convert_encoding') ? mb_convert_encoding($real_filename, 'UTF-8', $context['character_set']) : $real_filename); |
|