prejf has asked for the wisdom of the Perl Monks concerning the following question:

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. Best regards, P.R

Replies are listed 'Best First'.
Re: mod_perl abort upload
by Mr. Muskrat (Canon) on Mar 31, 2011 at 21:34 UTC

    Call me crazy but I wouldn't store the information about a file in the database until after the file upload has completed successfully.

    You might have received some great answers if you had given more information on how you were doing the file uploads. (There are lots of ways to do it after all.)

    If you are doing it using straight CGI, you will find your answer in the CGI docs under Handling_interrupted_file_uploads.