相关疑难解决方法(0)

使用Spring Framework和jquery-upload-file插件问题上传文件

我无法通过AJAX从我的网络客户端上传文件到我的服务器.我在客户端使用以下jQuery库来进行文件上传:https://github.com/hayageek/jquery-upload-file

In the server-side, I'm using Spring Framework and I have followed the following Spring Tutorial to build my Service: https://spring.io/guides/gs/uploading-files/

At first, my server method looked like this (file was defined as @RequestParam):

@RequestMapping(value="/upload", method=RequestMethod.POST)
public @ResponseBody String handleFileUpload(@RequestParam("file") MultipartFile file){
    //functionality here
}
Run Code Online (Sandbox Code Playgroud)

but every time I submitted the Upload form I got a Bad Request message from the Server, and my handleFileUpload() method was never called.

After that, …

ajax spring file-upload jquery-file-upload

2
推荐指数
1
解决办法
737
查看次数

标签 统计

ajax ×1

file-upload ×1

jquery-file-upload ×1

spring ×1