I am uploading file in codeigniter using
$this->upload->do_upload('image')
but when file moves to particular path the file extension is changed (it's changed to lower case)
for example if I upload file "profile.JPG" it's changes to "profile.jpg"
Windows is intentionally case-insensitive (by default) when it comes to file names and extensions. It doesn't matter what casing you use. This was a primary design decision that Microsoft made previous to Windows in their original OS (MS-DOS) and file-system(s), to separate themselves from Unix.
PHP is not case sensitive with file extensions.
Within Windows Explorer, right click on the file name, click on “Rename” and change the file extension to . bak and then again change it to uppercase/lowercase. In this example “. bak” extension is just an example.
please change CI system library
default in CI upload library $file_ext_tolower = FALSE.
.system\libraries\upload.php
public $file_ext_tolower = TRUE;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With