Discussion:
WE GOT A PROBLEM
Przemysław Rejf
2011-03-25 15:58:59 UTC
Permalink
Hi, How to detect file upload abort using an upload hook in perl. When
client aborts the upload i need to remove the info about the file from
the db. I can't do it size base, because before upload ends i only have
an approximate file size (request + file). I'm tryin to use mod_perl
Apache2::Connection->aborted() but so far to no effect.
Brian McQueen
2011-03-25 16:11:21 UTC
Permalink
Have a status bit and set it in-progress. Don't set it to complete
until you are sure its done and correct. Don't remove the info. You
want it for debugging and a complete history anyway.
Post by Przemysław Rejf
Hi, How to detect file upload abort using an upload hook in perl. When
client aborts the upload i need to remove the info about the file from the
db. I can't do it size base, because before upload ends i only have an
approximate file size (request + file). I'm tryin to use mod_perl
Apache2::Connection->aborted() but so far to no effect.
--
Make a Small Loan, Make a Big Difference - Check out Kiva.org to Learn How!
Przemysław Rejf
2011-03-25 19:05:40 UTC
Permalink
Hello Brian,

Thank you for reply, i hope that we will keep in touch.
Well, currently my script fails with error "Apache2::RequestIO::read:
(70014) End of file found" when user aborts upload so i need to work on
that. But before that the upload hook was called n times, so i didn't
know if the upload was complete or not even when the hook wasn't called
anymore and the reminder of script was executing. Beta version of script
which was runned on winxp/apache used to check the data sent to hook: if
it was empty it ment user aborted. But now im on debian/apache and when
the user aborts, the hook isnt called, so i only get hook calls with
content. Also thinking the hook might not work as it should under
mod_prel and im in progress of checking that.

Best regards,
Waiting for reply.
Post by Brian McQueen
Have a status bit and set it in-progress. Don't set it to complete
until you are sure its done and correct. Don't remove the info. You
want it for debugging and a complete history anyway.
Post by Przemysław Rejf
Hi, How to detect file upload abort using an upload hook in perl. When
client aborts the upload i need to remove the info about the file from the
db. I can't do it size base, because before upload ends i only have an
approximate file size (request + file). I'm tryin to use mod_perl
Apache2::Connection->aborted() but so far to no effect.
Przemysław Rejf
2011-03-25 19:28:33 UTC
Permalink
25 marca 2011 20:05
Hello Brian,
Thank you for reply, i hope that we will keep in touch.
(70014) End of file found" when user aborts upload so i need to work
on that. But before that the upload hook was called n times, so i
didn't know if the upload was complete or not even when the hook
wasn't called anymore and the reminder of script was executing. Beta
version of script which was runned on winxp/apache used to check the
data sent to hook: if it was empty it ment user aborted. But now im on
debian/apache and when the user aborts, the hook isnt called, so i
only get hook calls with content. Also thinking the hook might not
work as it should under mod_prel and im in progress of checking that.
Best regards,
Waiting for reply.
------------------------------------------------------------------------
25 marca 2011 17:11
Have a status bit and set it in-progress. Don't set it to complete
until you are sure its done and correct. Don't remove the info. You
want it for debugging and a complete history anyway.
------------------------------------------------------------------------
25 marca 2011 16:58
Hi, How to detect file upload abort using an upload hook in perl. When
client aborts the upload i need to remove the info about the file from
the db. I can't do it size base, because before upload ends i only
have an approximate file size (request + file). I'm tryin to use
mod_perl Apache2::Connection->aborted() but so far to no effect.
------------------------------------------------------------------------
Loading...