I've followed the tutorial at http://net.tutsplus.com/tutorials/php/codeigniter-from-scratch-file-uploading-and-image-manipulation/ , and it has worked wonderfully. Unfortunately I am uploading to a file structure that is case sensitive. So I need to add a conversion (strtoupper) so image.jpeg automagically translates to image.JPG. any suggestions?
Changing jpeg to JPG is not just capitalisation so strtoupper will not work.
So what you want to do is change the extension in a file upload form?
I can not be bothered to watch the tutorial - what code do you have?
You need to strip the extension with something like this:
$strip = explode(".", $fileName); // Split file name into an array using the dot
$fileExt = end($strip); // Now target the last array element to get the file extension
Then use strtoupper like:
$fileExt = strtoupper($fileExt);
In theory this would work though I haven't tried it.
This topic is now closed. New replies are no longer allowed.