FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Upload not working on adding progress bar script in HTML file
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Upload not working on adding progress bar script in HTML file [message #184833 is a reply to message #184831] Tue, 11 February 2014 05:23 Go to previous messageGo to previous message
Michael Vilain is currently offline  Michael Vilain
Messages: 88
Registered: September 2010
Karma:
Member
In article <5d8ba92b-6d39-4d51-ad90-eef3bbfdf8f7(at)googlegroups(dot)com>,
Saikat Saha <saikat(dot)saha5(at)gmail(dot)com> wrote:

> I am creating an app where I need to upload file using HTML input type="file"
> to a PHP server,when I upload the file to the PHP link without progress bar
> its working fine but when i add progress bar count script using ajaxform its
> unable to upload the file to the PHP server while this progress bar code
> works fine for this online test server, http://posttestserver.com/post.php.
>
> I am not getting what is the actual issue as I am not aware of PHP code and
> my friend is not aware of HTML code,my friend is saying there is nothing to
> do from his end as it is working fine without progress bar script. I had
> tried all possible progress bar script available in the web.please help me
> out how to solve it with progress bar count.

In order to actually track the progress of the download, you're going to
have to do all the heavy lifting that the browser and server is doing
for you. Most likely this would be a java applet that you'd have to
write. If you think about it, the server has to has no knowledge of the
byte stream being sent to it by the browser. It's my understanding that
if you send the actual length of the file to be transferred down to the
browser, it can display a progress bar.

The reverse is not true. If you use the <input> tag, there's no
provision to tell the server in the tag how long the transfer would be.
And once it starts sending the file, the server can't communicate with
the browser until it's complete.

If this is a *must have*, I'd look at other tools besides php to
transfer a file with a progress bar. You'll most likely have to code it
by hand.

A quick and dirty workaround is to unhide an animated GIF of clock hands
or rotating dots or whatever but it won't have any correlation to what's
being transferred. But it will give the user feedback that something is
happening.

--
DeeDee, don't press that button! DeeDee! NO! Dee...
[I filter all Goggle Groups posts, so any reply may be automatically ignored]
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: user resgiartattion form
Next Topic: Array key names
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 27 13:26:38 GMT 2024

Total time taken to generate the page: 0.04907 seconds