通过Ajax发布Base64图像数据 - 数据截断

问题描述:

我试图通过ajax发送Base64图像数据到服务器。 有时候所有的照片都是这样制作的,其他时候只有少数照片制作。通过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)有这样的限制。