UPPER CASE file extensions failing to upload

truecms.net.au - November 21, 2008 - 08:36
Project:Ubercart Option Images
Version:5.x-1.0-3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hi.
Upper case image extentions are being rejected by the module. But what if camera makes them UPPER CASE? I don't want to edit every file manually and I believe nobody wants.

Could you please update your module Line #412 uc_option_images.module to include strtolower() function like in the working example below:

    if (!in_array(strtolower(pathinfo($file->filename, PATHINFO_EXTENSION)), array('png', 'jpg', 'gif'))){

This is also would be good to have an option to adjust (or read from php.ini) the maximum file size to upload as this is hard coded at the moment

Actually I am uploading changed file if someone has similar problem with maximum file size and uppercase image extensions. (remove .zip extension - the file isn't compressed)

#1

truecms.net.au - November 21, 2008 - 08:44
Category:task» bug report

changing to bug report instead of task.

#2

tjholowaychuk - November 21, 2008 - 17:03

Interesting, strange that a camera would do that, very odd convention! This really should be a mime check not an extension check but I do not have time to adjust this (anyone willing to maintain certainly can)

 
 

Drupal is a registered trademark of Dries Buytaert.