[英]Posting Base64 Image Data via Ajax - Data Truncating
我正在尝试通过Ajax将Base64图像数据发送到服务器。 有时所有图片都可以制作,其他时候只有少数可以制作。
关于错误检查服务器是否已接收所有数据的任何想法?
http.open("post", URL, true);
http.onreadystatechange = function()
{
if(http.readyState == 4)
{
if(http.status == 200) {
alert(http.responseText);
alert("eReport Successfully sent to Server " + CustID +" "+name +" "+ListType);
//clearCurrentReport();
removeReport(CustID, ListType);
}
// alert("Received:" + http.responseText);
else
alert("Report NOT SENT. Error Communicating with Server. Please try again when you have a connection." );
}
};
params = custid="+CustID+"&photo1="+pic1+"&photo2="+pic2+"&photo3="+pic3+"&photo4="+pic4+"&photo5="+pic5+"&photo6="+pic6;
http.send(params);
可能的问题是您正在发送的数据量。 服务器对数据有限制,可以立即发送。 而php(如果您使用的是php)则有这样的限制。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.