How can i rename files on Upload?
I need to replace the folowing characters on upload in the filename: äöüßÄÖÜ,'*+~
Does anyone have a solution
I need to replace the folowing characters on upload in the filename: äöüßÄÖÜ,'*+~
Does anyone have a solution
RE: Rename on File-Upload
Please be more specific
RE: Rename on File-Upload
RE: Rename on File-Upload
I think i could be done in commands.php, but i don't know where an how. Because i'm a beginner.
If someone has a snipplet i'll be very happy
RE: Rename on File-Upload
just before the move_uploaded_file command you can alter the $sFileName.
RE: Rename on File-Upload
RE: Solution
because i need it only in Filemanager.
If someone has a better Solution, please post.
look for:
// Get the uploaded file name.
$sFileName = $oFile['name'] ;
After this insert the following code:
// characters that should be replaced
$d1 = array(" ","ä" , "ö", "ü", "ß", "Ä", "Ö", "Ü");
// Replace them by:
$d2 = array("_","ae" , "oe", "ue", "ss", "Ae", "Oe", "Ue");
//new filename
$sFileName = str_replace($d1, $d2, $sFileName);