2
使用ASP.NET MVC,当提交的应用程序/表单丢失了某些内容时,我会在dropzone文件上获得一个很好的红色“X”,但错误消息是“[对象的对象]”:ASP.NET MVC中的Dropzone错误消息
我的控制器:
if (some error)
{
Response.ClearHeaders();
Response.ClearContent();
Response.StatusCode = 500;
Response.StatusDescription = "Internal Error";
return Json(new { Message = "Missing Something", JsonRequestBehavior.AllowGet });
}
我的javascript:
<script>
//File Upload response from the server
Dropzone.options.dropzoneForm = {
maxFilesize: 20,
init: function() {
this.on("complete", function(data) {
// ??????? var res = data.xhr.responseText ;
});
}
};
</script>