easyui实现文件上传

jsp表单:

js:

$("#form1").form("submit", {
    type: 'post',
    url: 'addFinancing',
    onSubmit: function (param) {
	param.bdatajson = bdatajson
    },
    success: function (data) {}
});

在后台获取:

@RequestMapping(value = "/addFinancing")
public @ResponseBody String addFinancing(HttpServletRequest request, @RequestParam(value="contractFile")MultipartFile
    contractFile, @RequestParam(value = "invoiceFile")MultipartFile invoiceFile) {
        String applicationId = request.getParameter("applicationId");
        String bdatajson = request.getParameter("bdatajson");
        //在这里对获取到的文件做一些业务上的逻辑操作就可以了
}

你可能感兴趣的:(easyui,文件上传,前端)