xmlhttprequest 级别 2 的最大文件上传大小是多少?

使用 HTML5 的 xmlhttprequest 级别 2 的最大文件上传大小是多少?

What is the maximum file upload size with xmlhttprequest level 2 with HTML5?

推荐答案

XMLHttpRequest 规范 没有提到对上传大小的任何限制.

The XMLHttpRequest specification does not mention any limits on the upload size.

实际上,上传请求受限于:

In practise, upload requests are limited by:

  1. 同时上传的数量:如何流行的浏览器允许许多并发 AJAX (XmlHttpRequest) 请求?
  2. 网络服务器上配置的限制,例如.LimitRequestBody 在 Apache 上,client_max_body_size.
  3. 服务器端脚本环境的限制,例如upload_max_filesizepost_max_size 在 PHP 中.
  4. 内存限制(错误,客户端或服务器端).
  1. The number of simultaneous uploads: How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers?
  2. The configured limit on the web server, eg. LimitRequestBody on Apache, client_max_body_size on Nginx.
  3. The limits in the server-side scripting environment, e.g. upload_max_filesize and post_max_size in PHP.
  4. Memory limits (bugs, client-side or server-side).

另见:

  • 使用 XmlHttpRequest 发送文件:流式传输?

相关文章