Open GoogleCodeExporter opened 8 years ago
Adding the following to the /admin/functions.php line directly below line 489
after: closedir($handle) will rename the files uploaded by removing the
whitespace and provide a possible fix for the problem:
$fileName = basename($file);
$directoryPath = $dirname."/";
foreach($files as $k=>$file){
if(strpos($file," ") >=0){
$oldFilePath = $directoryPath.$file;
$newFileName = str_ireplace(" ","",$file);
$newFilePath = $directoryPath. $newFileName;
rename($oldFilePath, $newFilePath);
$files[$k] = $newFileName;
}
}
Original comment by aimsdigi...@gmail.com
on 3 Apr 2012 at 11:07
Hi there, thanks for the code! Would this allow for the previous images already
uploaded to be fixed?
Marc
Original comment by bra...@gmail.com
on 26 Apr 2012 at 4:03
Thanks, this worked like a charm! Just added this code, then re-scanned the
folder, and all the thumbnails now work. So glad I didn't have to re-upload
300mb of renamed photos.
Original comment by beezwi...@gmail.com
on 1 Jul 2012 at 11:55
Excellent! Fixed the problem for me too, after rummaging through doezens of
posts that didn't help.
In version 1.9.13 the code goes after: closedir( $handle ); in line 245
Original comment by TDHarn...@gmail.com
on 28 Jul 2013 at 3:55
Original issue reported on code.google.com by
bra...@gmail.com
on 27 Feb 2012 at 3:41