Sorry completly wrong topic... please admin move this posting
I found the issue!
In my Server Environment it seems that uploads via FLASH are UTF8 Filenames.
HTML Form Uploads are Standard ASCII
So i need to detect if its uploaded via FLASH or HTML
This Line does the job, included decoding:
if ($_GET['method'] == "flash") $filename = utf8_decode($filename);
- Code: Select all
$filename = $_FILES['upfile']['name'];
if ($_GET['method'] == "flash") $filename = utf8_decode($filename);
$filename = str_replace("'",'',"$filename");
$filename = str_replace("&",'_',"$filename");
$filename = str_replace("!",'_',"$filename");
$filename = str_replace("@",'_',"$filename");
$filename = str_replace("#",'_',"$filename");
$filename = str_replace("$",'_',"$filename");
$filename = str_replace("%",'_',"$filename");
$filename = str_replace("^",'_',"$filename");
$filename = str_replace("*",'_',"$filename");
$filename = str_replace("(",'_',"$filename");
$filename = str_replace(")",'_',"$filename");
$filename = str_replace("-",'_',"$filename");
$filename = str_replace("+",'_',"$filename");
$filename = str_replace("=",'_',"$filename");
$filename = str_replace("|",'_',"$filename");
$filename = str_replace(" ",'',"$filename");
$filename = str_replace("รค",'ae',"$filename");
$filename = stripslashes("$filename");
$filesize = $_FILES['upfile']['size'];
$fancyurl=rand('1','999');