[Kc] File Validation

Garrett Goebel garrett at scriptpro.com
Fri Jan 17 11:38:37 CST 2003


Gene Dascher wrote:
> 
> Is there a Package that I can use to verify that a file that a
> user is uploading to my server is a valid file for the extension
> that they have given?  For now, I want to limit it to a small
> selection of web-friendly image types (jpeg, gif, png).

Hmm... Someone else may have a better answer, but I wonder if Image::Size
might fit the bill.
http://search.cpan.org/author/RJRAY/Image-Size-2.991/Size.pm

It reads the dimensions of an image in several formats. Not exactly an image
file validator... but might be a good enough square peg for that round hole.

O'Reilly has just released: "Perl Graphics Programming"
(http://www.oreilly.com/catalog/perlgp/). We could check on getting O'Reilly
to send you a review copy if you'd be willing to review the book. Of course,
you're probably just interested in an answer to the issue at hand. -But it'd
be interesting to hear how O'Reilly's book compares to Manning's "Graphic
Programming with Perl"; which Doug Sparling will be reviewing in a not too
distant meeting.

--
Garrett Goebel
IS Development Specialist

ScriptPro                   Direct: 913.403.5261
5828 Reeds Road               Main: 913.384.1008
Mission, KS 66202              Fax: 913.384.2180
www.scriptpro.com          garrett at scriptpro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/kc/attachments/20030117/432f0562/attachment.htm


More information about the kc mailing list