Page 1 of 1

Title from original filename (upper- & lowercase

Posted: 02 Feb 2021, 08:54
by wemo
Hi there,
if i upload the files via multiple upload, all filenames are lowercase.

The title of the picture should by the original filename with upper- und lowercases.
Maybe also with special characters translated to html.

Please help.
Yours,
Werner

Re: Title from original filename (upper- & lowercase

Posted: 02 Feb 2021, 13:25
by Jan
Hi, there was a specific protection in past but the lower rule is not more needed.

Try to change this file:
administrator\components\com_phocagallery\libraries\phocagallery\file\fileupload.php

line cca 263

FROM:

Code: Select all

//$filepathImgFinal 		= JPath::clean($path->image_abs.$folder.strtolower($file['name']));
TO:

Code: Select all

//$filepathImgFinal 		= JPath::clean($path->image_abs.$folder.strtolower($file['name']));
$filepathImgFinal 		= JPath::clean($path->image_abs.$folder.$file['name']);
And let me know if it works for you. I will add it to next version.

Jan

Re: Title from original filename (upper- & lowercase

Posted: 03 Feb 2021, 09:04
by wemo
And when i use the multiple upload tool?
And what can i do with the special characters like ä, ö, ü, ß?
I need it in the title!

Re: Title from original filename (upper- & lowercase

Posted: 03 Feb 2021, 19:27
by Jan
Hi, does not work for you in Multiple Upload?

Diacritic characters are not supported in filenames, this is assigned to possible problems on servers, see:

https://www.phoca.cz/documents/2-phoca- ... ing-images

Mostly the best way is to avoid using such characters in filenames, example:

Deutsche Übersetzung.jpg => deutsche-uebersetzung.jpg
März.jpg => maerz.jpg
Straße.jpg => strasse.jpg

etc.

Jan

Re: Title from original filename (upper- & lowercase

Posted: 04 Feb 2021, 16:17
by wemo
I know that servers cannot handle diacritic characters, but is there a way, that the gallery converts e.g. "ö" automatically to "oe"?

Werner

Re: Title from original filename (upper- & lowercase

Posted: 05 Feb 2021, 01:02
by Jan
Hi, there is no such option, the problem is, the files can be uploaded to phocagallery image folder many way: per Phoca Gallery but even per FTP or another extension, etc. So even there will be such function, it will be not 100% :idea:

Jan