New image formtool enhancements have issues with case sensitive file systems

Description

If you upload an image that has JPG (all uppercase) to the new image formtool on a case sensitive file system, and you have other image fields that have ftSourceField="" and ftCreateFromSourceDefault="true" and ftConvertImageToFormat="jpg" then the generated images have the extension jpg (note, all lowercase), however FarCry stores the extension in the db as JPG. This causes a file not found error on case sensitive file systems.

Below I have two fields that demonstrate this. Create a custom type with these on a case sensitive file system (I tested on CentOS Linux). Upload the source image and you will see that it will result in a "file does not exist" error generated from /farcry/core/packages/formtools/image.cfc:552

Ex.

<cfproperty ftSeq="310" ftFieldset="Product Photo" name="imgSource" type="string" hint="The URL location of the uploaded image" required="No" default=""
ftType="Image"
ftCreateFromSourceOption="false"
ftAllowResize="false"
ftDestination="/images/npProduct/imgSource"
ftlabel="Source Image"
ftImageWidth=""
ftImageHeight=""
ftbUploadOnly="true"
ftAllowedExtensions="jpg,jpeg,gif,png,tiff,tif,bmp"
ftHint="Upload your high quality source image here." />

<cfproperty ftSeq="320" ftFieldset="Product Photo" name="imgDetail" type="string" required="no" default=""
ftType="Image"
ftDestination="/images/npProduct/imgDetail"
ftImageWidth="300"
ftImageHeight=""
ftAutoGenerateType="FitInside"
ftSourceField="imgSource"
ftCreateFromSourceDefault="true"
ftAllowUpload="true"
ftQuality=".9"
ftConvertImageToFormat="jpg"
ftAllowedExtensions="jpg,jpeg,gif,png,tiff,tif,bmp"
ftlabel="Detail Image"
ftHint="This image will appear on the Product detail page" />

Environment

None

Activity

Show:

Blair McKenzie December 22, 2010 at 12:38 AM

This should be fixed now - the generate image function now returns the path for the new image.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created December 5, 2010 at 2:38 AM
Updated July 9, 2011 at 12:25 PM
Resolved July 9, 2011 at 12:25 PM