开发者

how to create the upload progress bar using javascript

开发者_StackOverflow中文版i am using php to upload the file to server, HTML and javascript on the client side.

i want to create a determinent progress bar which progress of the file upload,using javascript

Regard, fresher


  • one of many libraries: http://github.com/drogus/jquery-upload-progress;

  • blog article: http://drogomir.com/blog/2008/6/30/upload-progress-script-with-safari-support

  • and demo: http://drogomir.com/files/blog/jquery-upload-progress/example/


I thought i will add a few words to discussion :)

As far as I know you are not able to monitor file upload from Javascript only.
Javascript is tool to dynamically update client side - your progress bar.

Means your solution really depends on control you're having over the server machine.
To follow file progress you can write server side script or use http server built in functions. Again depending on your server, this can be PHP Pecl extensions' functions, simple Perl script checkin status of the file on server, etc.

Note: You can also add another client-side technology here - Flash, which can monitor the status of sent files.


The fastest way that don't require any server-side configuration is http://swfupload.org/

afaik any other methods require some additional software/plugins for web server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜