httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+apa...@sunstarsys.com>
Subject Re: help with incomplete uploads
Date Tue, 10 Sep 2002 17:52:52 GMT
Hector Pizarro <hpizarro@amautatech.com> writes:

[...]

> My question is, is there any way to check if the upload is complete
> before I save the file? I understood from the docs on the apreq mod that
> "$upload ($apr->upload)" fetchs all that file and info related, but from
> experience it seems it doesnt check if the upload is complete...

The return value of $apr->parse should return an error status (non-
zero) if the upload was interrupted.  The Apache::Request documentation 
suggests you try something like

  my $status = $apr->parse;

  if ($status) { # error occurred
    my $errmsg = $apr->notes("error-notes");
    warn "APREQ ERROR: [$status] $errmsg";

    # handle error here
  }

  # parse successful; upload handling code goes here


Does this catch the error?

-- 
Joe Schaefer

Mime
View raw message