开发者

2 questions about HTTP file upload

  1. Is it possible to use jquery .ajax() call to post a file to the server and setup a callback function when the upload is done?

  2. Is it possible to get the progress of the uploading process(as G开发者_如何学GoMail) using any possilbe method?


  1. not via ajax, but via hidden iframe check this out Gmail like file upload with jQuery

  2. yes, you'll need custom logic on server side. GMail like file upload progress bar with GWT?

there are plenty of q&a's on stackoverflow on the topic try searching for them


You cant do it natively in all browsers so you have to use a workaround like uploading through a hidden iframe, or using flash (at least for the browsers that dont support it). There are several jquery plugins that implement ajax uploads.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜