GetSimple Support Forum

Full Version: Preserve case for uploaded files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I've got this use case where I would like to upload performance test reports which consists of one html and several images (jpgs and gifs). The report, including the html doc, is exported from the test tool. The filenames includes both lower and uppercase letters.

My problem is that I upload the files with GS, their names gets converted to lower case. So the report doesn't show all the fancy charts and images.

After a little code browsing, I found the ./admin/inc/basic.php with the function clean_img_name which I think gets called for every file uploaded. The first line in that function goes like this: $text = strip_tags(lowercase($text));

I could go ahead and remove the call to lowercase, but I'm not at all sure what I could/will break by doing so...

Thanks for a great CMS. It's been no more than a few days since I installed it... Good stuff!

Best regards,
beam
hi and welcome here!

Well, for sure it is done with good intention that uploaded filenames are converted to lowercase because most servers work with Linux/Apache and as that is case sensitive so are filenames

I would suggest to give it a try, comment off that command and upload images
after they are uploaded they are treated with their filenames, so I would not expect problems

an alternative for you without modifying anything would be to upload the images by FTP to the data/uploads-folder on your server, in that case the filenames stay untouched

Cheers, Connie
Connie Wrote:hi and welcome here!
Thanks Smile

Connie Wrote:Well, for sure it is done with good intention that uploaded filenames are converted to lowercase because most servers work with Linux/Apache and as that is case sensitive so are filenames
I m h o case preservation would cause less problems than conversion does.

Connie Wrote:I would suggest to give it a try, comment off that command and upload images
after they are uploaded they are treated with their filenames, so I would not expect problems
I did, it works Smile

Connie Wrote:an alternative for you without modifying anything would be to upload the images by FTP to the data/uploads-folder on your server, in that case the filenames stay untouched
Yes, definately. But I prefer the more user friendly GetSimple GUI.

Regards,
beam