Loading ...
Sorry, an error occurred while loading the content.

Re: Upload Progress

Expand Messages
  • Jeff Boes
    ... length of the file. Is this ... Okay, now that I ve REALLY READ your message... While it s true that your uploading script won t receive control
    Message 1 of 3 , Aug 1, 2000
      --- In perl-beginner@egroups.com, Agustinus Setijanto <agust.jkt@g...>

      > The script will read the bytes received by the Unix server (using ls
      > -l command combined with cut and grep) and compare it with the total
      length of the file. Is this
      > possible? How do I open a second window using Perl script?

      Okay, now that I've REALLY READ your message... <blush>

      While it's true that your uploading script won't receive control until
      the file is uploaded, it's possible that you could run another window
      which gets some information from the server on how the upload is
      progressing. This depends on how the server handles temp files, so I
      won't claim for a minute that this *will* work. The only way to create
      a new window is via a client-side command, which means Javascript. You
      could put a 'onSubmit' handler in the form, which opens a new window
      running the other progress-monitoring script.

      As I see it, the problem will be determining which file progress to
      report. If you have two users uploading at the same time, you'll need
      to do some very fancy coding to figure out which file is theirs IF the
      server is using temporary filenames to represent the upload.

      Therefore, I'll now admit that this is possible the way you've stated
      it, but I still don't think it's worth the trouble. For upload scripts
      I've written, it's been sufficient to pop up a Javascript window with
      static text saying, "When you press the OK button in this window, the
      upload will start. It may take a long time. Please be patient."
      Anything further is cute window-dressing, but probably more work than
      it's worth.
    Your message has been successfully submitted and would be delivered to recipients shortly.