Hi Dave, That's what I'm saying -- I'm normalizing the case -- I'm explicitly setting the image name to lcase(imagepathname) in the cfimage tag. If however -- and this was definitely an edge case happening in testing -- there is an image already at that path with the same name except for case, cfimage will not change the filename to the explicit lcase version specified in the tag.
Certainly, I wish I always had control over how and when platform decisions were made. Unfortunately, that's not real world. I am, however, very aware that there is the potential for this image-stor to be moved at some point in the future -- if we were to move to a CDN, for instance. The CDN we use for other applications is definitely on a case-sensitive OS, so there you have the scenario that concerns me. I've got the issue taken care of, in that there will not be any upper-case filenames in the image-stor to start. But it was a problem I ran into, and thought I'd get the feedback on what the behavior _should_ be, rather than what it is. Cheers, Kris On Tue, Jan 18, 2011 at 11:35 AM, Dave Watts <[email protected]> wrote: > > > The issue was not whether the overwrite was happening -- it definitely > was > > -- the new image was written. There was no ftp involved -- this was all > > cffile from a form post. > > > > What I noted was that the original file -- the one being overwritten > (with > > the same name, but different case), did not use the explicit case > specified > > in the cfimage tag. Added interesting note is that the file is being > resized > > as well. > > > > While this isn't really an issue for us on a windows server, if we were > to > > ever move this image storage to, say, a linux server, this would be a > > problem, in that what we've stored in the DB as the filename would not > match > > the filename on disk. > > > > We're expecting a lower-case image name since that's what we're passing > to > > cfimage, so that's what we're storing in the DB. > > Well, Windows isn't going to change its behavior just for you. So, you > might need to take additional steps to deal with this. On the other > hand, if you just ran it on Linux (or other OSs with case-sensitive > filesystems) in the first place, you wouldn't have encountered the > problem, right? The only time you should encounter a problem is if you > start running it on Windows, then need to migrate it and its existing > data to Linux. > > So it seems to me that you can either (a) add functionality to the > application to normalize cases just for Windows, or (b) create a > normalization process for migration purposes. I'd go with (b) I think. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341032 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

