Jump to content

Upload - Progress


jaymc

Recommended Posts

You need Perl or you need to hack the source / core, explicitly altering how rfc1867.h works, which I wouldn't recommend if you don't know C or C++ and PHP(s) core structure. There is a hack to do this, but it has memory leaks. If you check the PHP mailing list around June of 2003, Wez Furlong (PHP Team) and someone else posted a better way of doing it (supporting RAW_POST_DATA) for upload input streams!


me!
Link to comment
Share on other sites

[quote author=printf link=topic=110187.msg444950#msg444950 date=1159750565]
You need Perl or you need to hack the source / core, explicitly altering how rfc1867.h works, which I wouldn't recommend if you don't know C or C++ and PHP(s) core structure. There is a hack to do this, but it has memory leaks. If you check the PHP mailing list around June of 2003, Wez Furlong (PHP Team) and someone else posted a better way of doing it (supporting RAW_POST_DATA) for upload input streams!


me!
[/quote]
That is correct. Im trying to search an alternative way than using Perl to implement the upload progress bar but as of now i found nothing. I'll keep on googling  :)
Link to comment
Share on other sites

I believe there may be a way to do this though I'm not 100% sure.  I was considering something similar a while ago.  The way I thought of doing it was to use JavaScript/AJAX/PHP.  JavaScript could find the total filesize, though the only way I found so far is tricky with security permissions and unsigned ActiveX (see here: http://www.jguru.com/faq/view.jsp?EID=330134).  AJAX would call a php script which would check the current filesize of the file as it's being uploaded to the server.  This is where I was a little stuck personally as I don't think you can use $_FILES until after the file is uploaded.  Hopefully you'll be able to find out a little more from here as I put my own research on hold some time ago.

HTH

Dest
Link to comment
Share on other sites

[quote author=Destruction link=topic=110187.msg444976#msg444976 date=1159754691]
I believe there may be a way to do this though I'm not 100% sure.  I was considering something similar a while ago.  The way I thought of doing it was to use JavaScript/AJAX/PHP.  JavaScript could find the total filesize, though the only way I found so far is tricky with security permissions and unsigned ActiveX (see here: http://www.jguru.com/faq/view.jsp?EID=330134).  AJAX would call a php script which would check the current filesize of the file as it's being uploaded to the server.  This is where I was a little stuck personally as I don't think you can use $_FILES until after the file is uploaded.  Hopefully you'll be able to find out a little more from here as I put my own research on hold some time ago.

HTH

Dest
[/quote]

Yeh thats exactly how I thought it could be done

for that to work though, you would need to know the file name the the php ["tmp"] dir and just java ajax refresh every 5 seconds and compare the uploaded so far file size to the actually file size

Its just how to do that though..
Link to comment
Share on other sites

You still need Perl, for that version, because it needs to pass the file(s) name to PHP, because PHP can not get at the RAW_POST_DATA, so you will be using (2) connections, (1) to upload, (1) to monitor, that keeps looping, so 10MB file, uploaded at 30Kbytes per second will send 900 requests to the server if the interval is 1.5 seconds. Lower connection speed(s) results in more looping requests!

Not very smart, if you ask me!

me!
Link to comment
Share on other sites

I can do it but as a fake upload counter not a reel situation but the user dont know that ha.

what i do is when a user submits the image i point the form to a update.php and then from update.php i redirect them to a page where i got a animated gif going from side to side then afther 40 sec i send them to a confirmation page with thank you but if there is a error they goto the upload page agin with a error comment.

all i use is a animated image and php location syntex.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.