I was thinking of doing something like this

    my $u = CGI::Uploader->new(
      spec => {
        file => {
         gen_files => {
           'img_1_thmb_1' => {
             if_mimetype => '/^image\/.+/',
             transform_method => \&gen_thumb,
             params => [ w => 100, h => 100 ],
             }
           }
        }
      },

Then in Uploader, make it only actually try to run this transform if
the mimetype matches that regular expression. That would leave room in
the future for people to add other if's based on what ever other
conditions they would like. ie: some folks may want to only thumbnail
if the width is greater than X, and so they could write that "if" in
there...

Let me know how this sounds

Jeff.

--
Jeff MacDonald
http://www.halifaxbudolife.ca
http://www.nintai.ca

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to