简体   繁体   English

xmlhttp GET 的最大数据大小是多少

[英]What is the maximum data size with xmlhttp GET

I tried to send my image to the server with xmlhttp.我尝试使用 xmlhttp 将图像发送到服务器。 It turns out that it does not work with an dataURL.事实证明,它不适用于 dataURL。 Is this because of a maximum data size for Get requests?这是因为 Get 请求的最大数据大小吗?

var drawing = document.getElementById("canvas");
var dataURL = drawing.toDataURL();
xmlhttp.open("GET","upload.php?data_sheet=" + dataURL, true);

Do you know how long the content of the dataURL is?你知道dataURL的内容有多长吗?

The maximum length of a URL is 2048 characters - if it exceeds the maximum length, it will simply cut off the overflow. URL 的最大长度为 2048 个字符 - 如果超过最大长度,它将简单地切断溢出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM