use only lowercase filenames for uploaded images
So, this one has been driving me nuts forever. I run into this problem with Data Assist File Upload on almost all my projects and have come up with all kinds of different ways of fixing this. But I have no 100% fix. Please let me know how to ensure that any file uploaded will be lower case.
So IMG1023.jpg becomes img1023.jpg
I've had limited success with strtolower() here.
<?php
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
if(isset($_POST["Update"])){
WA_DFP_UploadFiles("WA_UploadResult1", "newimg", "2", "".strtolower(((isset($_FILES["newimg"]))?$_FILES["newimg"]["name"]:"")) ."", "JPG:80", $WA_UploadResult1_Params);
}
?>
Also, if you can suggest something to remove whitespace from file names, that would be a help too. So that "IMG the Boat.jpg" become "img-the-boat.jpg" or something.