2011-03-10 108 views
0

我試圖通過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); 

回答

0

可能的問題是您發送的數據量。服務器對數據有限制,可以一次發送。和PHP(如果你使用PHP)有這樣的限制。