Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Apache2::ASP::UploadHookArgs
Argument for UploadHook instances

Apache2::ASP::UploadHookArgs - Argument for UploadHook instances



NAME

Apache2::ASP::UploadHookArgs - Argument for UploadHook instances


SYNOPSIS


  my $Upload = Apache2::ASP::UploadHookArgs->new(

    upload              => $upload, # An APR::Request::Param::Table object

    percent_complete    => $percent_complete,

    elapsed_time        => $elapsed_time,        # in seconds

    total_expected_time => $total_expected_time, # in seconds

    time_remaining      => $time_remaining,      # in seconds

    length_received     => $length_received,     # in bytes

    data                => defined($data) ? $data : undef,  # bytes received in this "chunk"

  );


DESCRIPTION

Rather than just passing a hashref as an argument, this class serves to enforce some structure to the whole Apache2::ASP upload model.


METHODS

new( %args )

%args should be as shown in the synopsis above.

upload( )

Returns an the APR::Request::Param::Table manpage object.

percent_complete( )

Returns a float representing what percent of the upload has been received so far.

elapsed_time( )

Returns the number of seconds since the upload began.

total_expected_time( )

Returns the total number of seconds we expect the upload to last.

time_remaining( )

Returns the number of seconds the upload will continue after this point in time.

length_received( )

Returns the number of bytes we have received from the upload so far.

content_length( )

Returns the value of $ENV{CONTENT_LENGTH} at this point, but may be updated later, based on usage and requirements.

data( )

Returns the bytes received in this ``chunk'' of the upload.


AFTER THE UPLOAD HAS FINISHED

After the upload has finished, you can count on the following methods returning actual values:

new_file( )

Returns the filename of the new file, as it was in the upload form field.

Example: C:\Documents\MyFile.txt

filename_only( )

Returns something like MyFile.txt

link_to_file( )

Returns something like /media/MyFile.txt


BUGS

It's possible that some bugs have found their way into this release.

Use RT http://rt.cpan.org/NoAuth/Bugs.html to submit bug reports.


HOMEPAGE

Please visit the Apache2::ASP homepage at http://apache2-asp.no-ip.org/ to see examples of Apache2::ASP in action.


AUTHOR

John Drago mailto:jdrago_999@yahoo.com


COPYRIGHT AND LICENSE

Copyright 2007 John Drago, All rights reserved.

This software is free software. It may be used and distributed under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy