fixed IE 11 names almost all files "blob"

This commit is contained in:
Ralf Becker 2014-09-09 16:30:29 +00:00
parent 7bed4b7dfa
commit f817dc7606

View File

@ -113,7 +113,7 @@ class etemplate_widget_file extends etemplate_widget
protected static function process_uploaded_file($field, Array &$file, $mime, Array &$file_data) protected static function process_uploaded_file($field, Array &$file, $mime, Array &$file_data)
{ {
// Chunks get mangled a little // Chunks get mangled a little
if($file['name'] == 'blob' && $file['type'] == 'application/octet-stream') if($file['name'] == 'blob')
{ {
$file['name'] = $_POST['resumableFilename']; $file['name'] = $_POST['resumableFilename'];
$file['type'] = $_POST['resumableType']; $file['type'] = $_POST['resumableType'];
@ -149,7 +149,7 @@ class etemplate_widget_file extends etemplate_widget
// move the temporary file // move the temporary file
if (!move_uploaded_file($file['tmp_name'], $dest_file)) if (!move_uploaded_file($file['tmp_name'], $dest_file))
{ {
$file_date[$file['name']] = 'Error saving (move_uploaded_file) chunk '.(int)$_POST['resumableChunkNumber'].' for file '.$_POST['resumableFilename']; $file_data[$file['name']] = 'Error saving (move_uploaded_file) chunk '.(int)$_POST['resumableChunkNumber'].' for file '.$_POST['resumableFilename'];
} }
else else
{ {