I'm in need of a 'good' method to limit files uploaded via mod_perl2 ( to photos of gif/jpg/png 100k or less)
2 - i've noticed a type of "image/jpeg" "image/gif" "image/png" for uploaded file types. can this be relied on to any extent?
I wouldn't. You're relying on the browser to supply a proper MIMe type, which IMHO is not the best place to put the burden.
Personally, I use Image::Size::imgsize() (see CPAN) for this. It automagically figures out the image's type (and size) based upon the file header. It doesn't even rely upon the .jpg or .gif ending, which would also be a bad idea.
-- Dan Wilga [EMAIL PROTECTED] Web Administrator http://www.mtholyoke.edu Mount Holyoke College Tel: 413-538-3027 South Hadley, MA 01075 "Who left the cake out in the rain?"