xmlhttprequest-level2

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

混江龙づ霸主 提交于 2019-11-28 09:07:01
问题 What is the maximum file upload size with xmlhttprequest level 2 with HTML5? 回答1: The XMLHttpRequest specification does not mention any limits on the upload size. In practise, upload requests are limited by: The number of simultaneous uploads: How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers? The configured limit on the web server, eg. LimitRequestBody on Apache, client_max_body_size on Nginx. The limits in the server-side scripting environment, e.g. upload

Chrome extension: how to pass ArrayBuffer or Blob from content script to the background without losing its type?

六眼飞鱼酱① 提交于 2019-11-27 11:51:25
I have this content script that downloads some binary data using XHR, which is sent later to the background script: var self = this; var xhr = new XMLHttpRequest(); xhr.open('GET', url); xhr.responseType = 'arraybuffer'; xhr.onload = function(e) { if (this.status == 200) { self.data = { data: xhr.response, contentType: xhr.getResponseHeader('Content-Type') }; } }; xhr.send(); ... later ... sendResponse({data: self.data}); After receiving this data in background script, I'd like to form another XHR request that uploads this binary data to my server, so I do: var formData = new FormData(); var

CORS request is preflighted, but it seems like it should not be

ⅰ亾dé卋堺 提交于 2019-11-27 08:54:44
The following cross-origin POST request, with a content-type of multipart/form-data and only simple headers is preflighted. According to the W3C spec, unless I am reading it wrong, it should not be preflighted. I've confirmed this happens in Chrome 27 and Firefox 10.8.3. I haven't tested any other browsers. Here are the request headers, etc: Request URL:http://192.168.130.135:8081/upload/receiver Request Method:POST Status Code:200 OK Request Headersview source Accept:*/* Accept-Encoding:gzip,deflate,sdch Accept-Language:en-US,en;q=0.8 Connection:keep-alive Content-Length:27129 Content-Type

CORS request is preflighted, but it seems like it should not be

白昼怎懂夜的黑 提交于 2019-11-26 14:22:15
问题 The following cross-origin POST request, with a content-type of multipart/form-data and only simple headers is preflighted. According to the W3C spec, unless I am reading it wrong, it should not be preflighted. I've confirmed this happens in Chrome 27 and Firefox 10.8.3. I haven't tested any other browsers. Here are the request headers, etc: Request URL:http://192.168.130.135:8081/upload/receiver Request Method:POST Status Code:200 OK Request Headersview source Accept:*/* Accept-Encoding:gzip