weixin_33693070 2014-09-04 13:03 采纳率: 0%
浏览 38

HTML5 Ajax上传-是否可降解?

I'm looking at this technique of uploading a file using Ajax:

http://www.sitepoint.com/html5-javascript-file-upload-progress-bar/

I have two questions about it.

  1. It seems to work on my computer using IE9. I was under the impression that it requires IE10+ according to caniuse: http://caniuse.com/#feat=fileapi

  2. What happens to a users computer who doesn't have an up-to-date browser, will it work like a traditional upload field in IE6 for example?

  • 写回答

1条回答 默认 最新

  • weixin_33690367 2014-09-04 14:53
    关注

    You can upload files with Ajax without Html5 and you don't need the File Api to do that either. The progress event however is a feature of the XMLHTTPRequest v2, so you'll have to handle that differently for older unsupporting browsers or not show progress at all :)

    Alternatively you could write your own upload handler that would report how much of the file has been sent, and then just probe it every x seconds to ask how far it has come. I think Telerik does this with their controls for ASP.NET and MVC.

    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置