Re: Upload Progress
| From: | Jed Verity | Date: | Sun, 08 Sep 2002 18:00:43 +0000 |
| Subject: | Re: Upload Progress | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-115674@lists.php.net to get a copy of this message | ||
Sorry, I wrote too quickly. I meant that the file size field value is passed
to the bottom frame. And JavaScript is used to resize the gif, not DHTML.
(Used to be DHTML when I was adding nbsp instead of resizing an image.)
HTH,
Jed
On the threshold of genius, Jed Verity wrote:
> There really isn't a great solution for this, that I know of. It's one of
> the few things that makes an argument for ASP over PHP, as far as I'm
> concerned (if you have the luxury of choosing). Below is what I did once to
> try to get around the problem. It worked *okay*.
>
> The bummer is that I had to ask people to enter the size of their file in a
> field. (Rough estimates were okay.) Then, as soon as somebody hit the submit
> button on my form, I popped up a small, modal, progress bar sized window
> that was actually two frames. I passed the file size value from the form
> field to the top frame. In the bottom frame, JavaScript created a bordered
> <div> equal in pixel length to the number of MB of the file being uploaded.
> The top frame, a PHP doc, would then refresh every three seconds, executing
> a filesize() on the uploaded file, converting it to MB, rounding up, and
> then using DHTML to resize the width of a blue-gradient gif contained in the
> <div> of the bottom frame of the progress bar window.
>
> Typically, this worked okay for me. It wasn't the prettiest progress bar in
> the world, but it did the trick for most people.
>
> HTH!
> Jed
>
>
> On the threshold of genius, Jacob Miller wrote:
>
>> Everything I've read says that there is no way to display the progress of a
>> file upload (via a form) using PHP.
>>
>> I'm currently working on a site which will regularly be accepting very
>> large uploads, anywhere from 10 to 250+ mb and I really need a way to
>> display the progress of the upload so that it doesn't appear as if the
>> browser has frozen for a few hours.
>>
>> Any suggestions for a solution?
>>
>> thanks
>> -jacob
>>
>