use strtolower when checking $ext for icons, so that file.MP3 will match.

-  $ext = array_pop(explode('.',$file['filename']));
+  $ext = strtolower(array_pop(explode('.',$file['filename'])));
CommentFileSizeAuthor
filefield.lowerext.patch1.14 KBaaron

Comments

jpetso’s picture

That sounds like a good idea, but I'm not sure what dopry meant with the line

// @todo: trim & strtolower file_extenstions with a formapi validate callback.

Can we have the above patch nevertheless? Where should that validate happen? The answer my friend, etc.

jpetso’s picture

Status: Active » Fixed

No answer in quite some time means I can commit this. Applied, enjoy! (at least, as long as that version of the icon name lookup is still alive, before being replaced with a naming specification compliant, mimetype-based lookup scheme.)

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.