[Maypole] File uploads
Simon Cozens
simon@simon-cozens.org
Thu, 25 Mar 2004 15:42:45 +0000
One of the things that Jesse's been quizzing me about, and I've been failing
to provide decent answers to, is the question of how to provide file uploads
in Maypole. The reason I've been equivocal about this because it turns out to
be front-end specific, and so I probably think it shouldn't go in the Maypole
core. But then, I have no idea where it should go.
For instance, if you're using Apache::MVC, with its mod_perl 1.x-ishness,
then the right way to process file uploads is to call $r->{ar}->upload
and muck about with the Apache::Upload objects. In CGI::Maypole, though,
you'd just call ->param as normal and mess with the filehandle/string magic
scalar returned. Completely different.
Since file uploading is reasonably rare and needs a fair amount of custom
handling anyway, would it be a reasonable answer to merely say that uploads
should be handled manually by applications, if I give a couple of examples of
how to do that in the cookbook?
--
So remember when you're feeling very small and insecure
How amazingly unlikely is your birth,
And pray that there's intelligent life somewhere up in space,
'Cause there's bugger-all down here on Earth. (Monty Python)