[Catalyst] Detecting if a user aborted a (long) download

Jonathan Rockway jon at jrock.us
Mon Mar 12 01:24:45 GMT 2007


On Sunday 11 March 2007 09:26, Thomas Klausner wrote:
> But how do I figure out if the download was successfull? I didn't find
> anything in the docs (but a RTFM-answer is appreciated, if I missed the
> right piece of codocumentation).

You probably want a subclass of IO::File that will callback into your 
application as the file is streamed.  Keep in mind that this won't account 
for buffering between the app and webserver, the webserver and the load 
balancer, the load balancer and the user's ISP's front-end proxy, the user's 
ISP's front-end proxy and the user's TCP stack, the user's TCP stack and the 
web browser, the web browser and disk cache, and finally the disk cache and 
the user's disk.  Not as simple as it seems, is it? :)

You'd be better off just letting the user download the file as many times as 
it takes for, say, a week.

Regards,
Jonathan Rockway

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070311/0192f437/attachment.pgp


More information about the Catalyst mailing list