PHP/SWFUpload progress

PHP/SWFUpload progress

am 24.12.2009 12:33:04 von geek.de

--000325574fb26a7816047b77cd6b
Content-Type: text/plain; charset=UTF-8

Hi all,

Wishing you a merry xmas! As a gift to you a little thing that I figured out
through long googling and trial and error:

We are using the swfupload (flash) upload tool to upload files to a php
script. For a rather cryptic reason on some clients the progress would show
too quickly when AVG Link scanning was activated on a windows machine. The
upload would have completed, but it was actually still uploading. Sound
weird? Yes that's what we thought.

We ended up solving it by installing SSL (https) on that machine which
solved the problem because the anti virus cannot "see" the upload requests
and tamper with it.

I know this is not strictly PHP related, but since this list was always
helpful for me i thought i would share this for xmas.

There is a question that came up though:
When uploading to a php page i could find a temporary file that was growing
on the server. Couldn't one monitor the growth of that file and therefore
track the progress with AJAX poll requests? I know this is more overhead but
this seems more reliable to me when there is something funny going on on the
client machine, like with the above anti virus. I couldn't figure out how to
determine which temp file it was though, because the request would be still
going while the file is uploaded and you cannot read the $_FILES variable or
similar.

Kind regards,
Tim

++Tim Hinnerk Heuer++

http://www.ihostnz.com

--000325574fb26a7816047b77cd6b--

Re: PHP/SWFUpload progress

am 26.12.2009 03:48:38 von Manuel Lemos

Hello,

on 12/24/2009 09:33 AM German Geek said the following:
> Hi all,
>
> Wishing you a merry xmas! As a gift to you a little thing that I figured out
> through long googling and trial and error:
>
> We are using the swfupload (flash) upload tool to upload files to a php
> script. For a rather cryptic reason on some clients the progress would show
> too quickly when AVG Link scanning was activated on a windows machine. The
> upload would have completed, but it was actually still uploading. Sound
> weird? Yes that's what we thought.

Very likely your modem is buffering the uploaded data.


> We ended up solving it by installing SSL (https) on that machine which
> solved the problem because the anti virus cannot "see" the upload requests
> and tamper with it.
>
> I know this is not strictly PHP related, but since this list was always
> helpful for me i thought i would share this for xmas.
>
> There is a question that came up though:
> When uploading to a php page i could find a temporary file that was growing
> on the server. Couldn't one monitor the growth of that file and therefore
> track the progress with AJAX poll requests? I know this is more overhead but
> this seems more reliable to me when there is something funny going on on the
> client machine, like with the above anti virus. I couldn't figure out how to
> determine which temp file it was though, because the request would be still
> going while the file is uploaded and you cannot read the $_FILES variable or
> similar.

That is exactly what I do with the PHP upload progress extension and a
special plug-in for the Forms Generation and Validition class. There is
no need for Flash.

http://www.phpclasses.org/formsgeneration

Here is a live example:

http://www.meta-language.net/forms-examples.html?example=tes t_upload_progress

This article explains it in more detail:

http://www.phpclasses.org/blog/post/61-File-upload-progress- meter-for-PHP-4-at-last.html

--

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php