0
我需要将图像base64编码发送到API。 我的json输出从base64代码只有10000个字符。通过ajax发送base64图像
var data = new Object();
data.image= $('#image').val();
data.date = new Date($.now());
console.log(JSON.stringify(data));
$.ajax({
type: "POST",
url: app.url
data: JSON.stringify(data),
contentType: "application/json",
crossDomain: true,
xhrFields: {
withCredentials: true
},
dataType: "json",
success: function (data, status, jqXHR) {
},
error: function (jqXHR, status) {
}
});
在我的console.log我有完整的字符串,但没有在请求中。
感谢
这只是铬控制台/网络显示器限于10000个字符 –