62,073
社区成员
发帖
与我相关
我的任务
分享
$.ajax({
method: "POST",
url: "@Url.Action("CheckFile", "Test")",
dataType: "json",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ fileName: "abcd.png" }),
success: function (data) {
if (data.ErrorCode == 2) {//有重名文件
if (confirm("是否要覆盖?")) {
//执行覆盖操作
}
else {
//取消
}
}
else {//没有重名文件
}
}
});