[Catalyst] HTTP::Body(::MultiPart) RFC md5 digests for uploads
A. Pagaltzis
pagaltzis at gmx.de
Thu Jun 29 03:51:30 CEST 2006
* Andrew Bramble <andrew.bramble at omnilab.com.au> [2006-06-28 10:20]:
> It took me some time to track down the fact that HTTP::Body::MultiPart was
> responsible for the writing of request data chunks to temporary files.
> Attached is a first try at this which includes
> patch HTTP::Body::Multipart to create a Digest::MD5 object and ->add chunks
> of incoming data to it.
> patch Catalyst::Request::Upload to add and accessor for 'md5'
> patch &Catalyst::Engine::prepare_uploads to take the upload object(s) from
> request->{_body}->upload and create Catalyst::Request::Upload object
> including the 'md5' attribute.
>
> I welcome comments about the sense and usefullness of this :)
Too specific, if you ask me. The next guy who has to do something
else on-the-fly during upload will have to write another patch
for his own purposes. How about patching the modules to provide
callbacks instead, so that any API client can do whatever
on-the-fly processing they want by passing in a closure?
Regards,
--
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;
More information about the Catalyst
mailing list