Intellij IDEA REST Client file uploading

I am trying to upload file through Intellij IDEA REST Client. I choose "File to upload (multipart/form-data)" and choose file to send. What is parameter name of this file? In my Sprint Controller i use this code

@RequestMapping(method = RequestMethod.POST, value = "/{id}/photo")
public void setCover(@PathVariable int id,
                     @RequestParam MultipartFile file) {
    System.out.println(file.getName());
}

I also tried different names, such as "file", "fileToSend", "File to send" for @RequestParam, but Spring always cant find MultipartFile paramater.


如果您希望在IntelliJ IDEA的REST Client中进行多部分文件上传,请点击此bug报告=> https://youtrack.jetbrains.com/issue/WEB-20197

链接地址: http://www.djcxy.com/p/48734.html

上一篇: 文件和表单数据的角度和弹簧错误400错误请求

下一篇: Intellij IDEA REST客户端文件上传