【发布时间】:2018-11-12 20:00:43
【问题描述】:
我正在尝试使用以下调用提交带有文件的表单:
var formData = new FormData(this);
$.ajax({
cache: false,
processData: false,
contentType: false,
data: formData,
type: "POST",
url: "api/action",
success: function (msg) {
console.log(msg);
},
error: function (msg) {
console.log(msg);
}
});
它在包括 safari 在内的网络浏览器中运行良好 它在安卓操作系统中运行良好
但在 IOS 中调用失败并返回错误 400
【问题讨论】:
-
您是否在 info.plist 中将
AllowsArbitraryLoads设置为YES?
标签: android jquery ios ajax file-upload