| @@ 1643-1648 (lines=6) @@ | ||
| 1640 | elseif (!empty($mime_type) && (isset($_REQUEST['image']) || !in_array($file_ext, array('jpg', 'gif', 'jpeg', 'x-ms-bmp', 'png', 'psd', 'tiff', 'iff')))) |
|
| 1641 | header('Content-Type: ' . strtr($mime_type, array('image/bmp' => 'image/x-ms-bmp'))); |
|
| 1642 | ||
| 1643 | else |
|
| 1644 | { |
|
| 1645 | header('Content-Type: ' . (isBrowser('ie') || isBrowser('opera') ? 'application/octetstream' : 'application/octet-stream')); |
|
| 1646 | if (isset($_REQUEST['image'])) |
|
| 1647 | unset($_REQUEST['image']); |
|
| 1648 | } |
|
| 1649 | ||
| 1650 | // Convert the file to UTF-8, cuz most browsers dig that. |
|
| 1651 | $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); |
|
| @@ 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']); |
|