从最新版本的 Chrome 版本 83.0.4103.61(官方构建)(64 位)Jquery $.AjaxFileUpload 不起作用,如果有人有想法请帮助我,这个 AJAX 调用在旧版本的 chrome 和其他浏览器中工作正常firefox 等。只有最新版本的 chrome 有问题这里是代码:
JSP 代码就像
<input type="file" id="fileform-a04d99a8-3cc0-49af-868d-48bdfd26f448" name="files" class="add-attachment-input" style="position: absolute; top: -100000px;" multiple="" >
Run Code Online (Sandbox Code Playgroud)
Javascript:
$("#fileform-" + code).AjaxFileUpload({
action: "/claims/post/attachment/",
onSubmit: function(element, filename) {
return {jobcode: code};
},
onComplete: function(filename, response) {
mci.claims.handleAttachmentResponse(code, $thisitem, filename, response);
}
});
Run Code Online (Sandbox Code Playgroud)
代码:
@RequestMapping(value = "/post/attachment/", method = RequestMethod.POST, produces = "text/html")
@ResponseBody
public String addAttachments(@RequestParam("files")
final List<MultipartFile> files, @RequestParam("jobcode") String jobcode)
{
jobcode = XSSFilterUtil.filter(jobcode);
final Map<String, String> result = …Run Code Online (Sandbox Code Playgroud)