No need to get defensive.

The original poster's request was for mime type validation, not for finding
image dimemsions and such. I was speaking specifically about how TMT
validates file types. I didn't even look at how TMT deals with file sizes,
dimensions, etc... The way that TMT validates file types is by regexp on
file extension:

tmt_globalPatterns.filepath_pdf = new
RegExp("\\\\[\\w_]*\\.([pP][dD][fF])$");
tmt_globalPatterns.filepath_jpg_gif = new
RegExp("\\\\[\\w_]*\\.([gG][iI][fF])|([jJ][pP][eE]?[gG])$");
tmt_globalPatterns.filepath_jpg = new
RegExp("\\\\[\\w_]*\\.([jJ][pP][eE]?[gG])$");
tmt_globalPatterns.filepath_zip = new
RegExp("\\\\[\\w_]*\\.([zZ][iI][pP])$");
tmt_globalPatterns.filepath = new RegExp("\\\\[\\w_]*\\.\\w{3}$");

Again... It's a nice validation library... But it's not really doing what
the poster was asking for.

Jim Rising
Sr. Cold Fusion Developer
ICGLink Inc.
www.icglink.com



-----Original Message-----
From: Massimo Foti [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 11, 2007 10:13 AM
To: CF-Talk
Subject: Re: Spry - File Upload - validate mime type

> This is nice, but it's really just using a regexp or pattern to define 
> file extensions...

That script does much more than just using a RegExp. Have you checked it? It
detect file dimensions (kb) and image dimensions (px). Do you think it would
be possible just using a RegExp?

Again, it's limited to images (actually jpg, png, gif and .bmp) and doesn't
work on FF (not anymore), but there is much more than just checking the file
extension.

----------------------------
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:283466
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to