[BUG] Custom thumbnails and uppercase extension [BUG] Custom thumbnails and uppercase extension
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[BUG] Custom thumbnails and uppercase extension

Started by Titooy, August 19, 2004, 09:10:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Titooy

When you have a file with an uppercase extension, the custom thumbnail doesn't work as it should.

If your file is VIDEO.AVI, your thumb must be VIDEO.AVI.jpg (or gif or png) instead of VIDEO.jpg

I presume the problem is in that line
               $file_base_name = str_replace('.'.$mime_content['extension'],'',basename($pic_row['filename']));
but I have not enough php skills to make it case insensitive.

Joachim Müller

you can't make it case insensitive, since on Lunix systems capitalization in filenames does matter (only on Windows it doesn't matter). This means you could have the files FOOBAR.avi, FOOBAR.AVI, foobar.avi and foobar.AVI in the same folder. I suggest adding the upper case filetypes to your filetypes table in the coppermine db manually as a quick fix. You should always upload files with lowercase extensions in the future.

GauGau

Titooy

Don't you think a good solution would be that foobar.AVI has foobar.JPG as a thumbnail ?

QuoteYou should always upload files with lowercase extensions in the future.
All the digital cameras I know use uppercase extension. Don't you think Coppermine should deal with that fact instead of forcing users to make one more manipulation in order to use it?

btw I tried to add AVI to my db and it said it already exists... :-\\

Joachim Müller

this issue is being discussed in the dev team, we'll oprobably rename all files on upload to be completely in lower case (bothe filename and extension), to have one common standard. This fix will go into the next version (cpg1.4.0).

GauGau