当删除失败时,JQuery File Upload Basic 加上 UI 的预期 json 响应

Expected json response by JQuery File Upload Basic plus UI when delete fails

使用 JQuery 文件上传 UI 插件时,https://github.com/blueimp/jQuery-File-Upload,点击上传文件的删除按钮时预期的 json 响应是什么?在服务器上删除期间发生错误或删除过程不成功。

项目网站上的文档指示以下示例作为删除响应 - https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#using-jquery-file-upload-ui-version-with-a-custom-server-side-upload-handler

{"files": [
{
"picture1.jpg": true
},
{
"picture2.jpg": true
}
]}

使用 false 而不是 true 返回类似的 json 响应似乎没有任何区别。

似乎 UI 插件没有对响应做任何事情,所以任何 json 响应都是有效的,并且无论删除是否成功都会产生相同的效果 - 该项目将从文件列表中删除。您需要修改 jquery.fileupload-ui.js 代码才能执行特定的错误响应。

What should I return in response to show error message on delete event for blueimp/jquery.file-upload-ui