in reply to Re: Perl/CGI Uploading file to the server using a upload hook is failing intermittently
in thread Perl/CGI Uploading file to the server using a upload hook is failing intermittently

You said, "It is completely unclear why you're bothering with the upload hook, so get rid of it :)"

The OP said, "While uploading the file on to the server, we want to show a progress bar of the file upload. For that we are using CGI upload hook to read the length of the buffer uploaded from the browser."

So how does using File::Copy allow them to show the progress of the upload? From what I can tell, it won't.

  • Comment on Re^2: Perl/CGI Uploading file to the server using a upload hook is failing intermittently

Replies are listed 'Best First'.
Re^3: Perl/CGI Uploading file to the server using a upload hook is failing intermittently
by Anonymous Monk on Jan 13, 2012 at 02:32 UTC

    So how does using File::Copy allow them to show the progress of the upload? From what I can tell, it won't.

    File::Copy takes care of copying the file, with binmode, error checking and everything :)

    If you still need an upload hook, just pass to  CGI->new like you had before

      The answer was simple, it was a totally my bad error:

      I left method="post" enctype="multipart/form-data" out of my form declaration in the HTML page.

      Once I did some debugging I realized that

      my $fileHandle = $q->upload('filename');

      returned NULL, with no error.