Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome, Guest. Please login or register.
Did you miss your activation email?

June 06, 2020, 06:56:50 AM

Login with username, password and session length
  • Total Posts: 190088
  • Total Topics: 20841
  • Online Today: 70
  • Online Ever: 917
  • (January 21, 2020, 09:02:26 AM)
Users Online
Users: 1
Guests: 40
Total: 41

Author Topic: DL Manager - Upload file extensions  (Read 1587 times)

0 Members and 1 Guest are viewing this topic.


  • Guest
DL Manager - Upload file extensions
« on: October 13, 2006, 08:01:11 AM »
wouldn't it make more sense if the file format/extension check is not case sensitive? Sure you could add the allowed extensions both in lower and upper case, but is there really any point in allowing .jpg and not .JPG files?

Anyway, I've made the following change in the TPdlmanager.php file to accomplish this, works for me :)

Code: [Select]
if(substr($name, strlen($name)-$extlen, $extlen)==$ext)
Code: [Select]
if(strcasecmp(substr($name, strlen($name)-$extlen, $extlen), $ext)==0)

Offline bloc

  • Founder
  • *
  • Posts: 5217
    • Bloc
Re: DL Manager - Upload file extensions
« Reply #1 on: October 15, 2006, 01:52:04 AM »
Well, for the normal ones it wouldn't matter, but in case of any obscure ones its done this way.

Besides, extension case are the uploaders responsibility, not TP. If someone insist on mixing them - which is a bad habit, many servers are sensitive to case in names - then at least admin can control it by adding all the variations.