Download & Extend

UPPER CASE file extensions failing to upload

Project:Ubercart Option Images
Version:5.x-1.0-3
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (won't fix)

Issue Summary

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)

Comments

#1

Category:task» bug report

changing to bug report instead of task.

#2

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)

#3

Status:needs review» closed (won't fix)

The 5.x version is no longer being supported for this module. We are cleaning up the 6.x version and preparing for the 7.x version.