Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: [BUG] Custom thumbnails and uppercase extension  (Read 2743 times)

0 Members and 1 Guest are viewing this topic.

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
[BUG] Custom thumbnails and uppercase extension
« on: August 19, 2004, 09:10:09 am »

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
Code: [Select]
               $file_base_name = str_replace('.'.$mime_content['extension'],'',basename($pic_row['filename']));but I have not enough php skills to make it case insensitive.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [BUG] Custom thumbnails and uppercase extension
« Reply #1 on: August 20, 2004, 09:07:17 am »

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
Logged

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
Re: [BUG] Custom thumbnails and uppercase extension
« Reply #2 on: August 26, 2004, 12:55:35 am »

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

Quote
You 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... :-\\
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [BUG] Custom thumbnails and uppercase extension
« Reply #3 on: August 26, 2004, 06:34:26 am »

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
Logged
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 16 queries.