Knife4j文件上传不显示上传选择文本域

Knife4j 4.5.0

@RequestParam改用@RequestPart即可

@Operation(summary = "上传文件")
@PostMapping("upload")
public Result<String> upload(@RequestPart MultipartFile file) throws Exception {
    String url = fileService.upload(file);
    return Result.ok(url);
}
posted @   槑孒  阅读(135)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示