We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
参照官方文档很多次尝试,打开doc页面 接口没有 上传按钮的 选项
版本: <knife4j-spring-boot-starter.version>3.0.3</knife4j-spring-boot-starter.version>
<knife4j-spring-boot-starter.version>3.0.3</knife4j-spring-boot-starter.version>
@ApiOperation("文件上传") @PostMapping(value = "fileUpload") @ApiImplicitParams({@ApiImplicitParam(name = "file", value = "单个文件", required = true,dataType = "MultipartFile", allowMultiple = true), @ApiImplicitParam(name = "fileTypeEnum", value = "文件类型", required = true)} ) public Result<FileUpLoadVO> fileUpload(@RequestParam(value="file") MultipartFile file, @RequestParam(value = "fileTypeEnum")FileTypeEnum fileTypeEnum) { FileUpLoadVO fileUpLoadVO = tencentService.fileUpload(file, fileTypeEnum); if(fileUpLoadVO == null){ return Result.failed("文件上传失败,请检查命名格式!"); } return Result.success(fileUpLoadVO); }
The text was updated successfully, but these errors were encountered:
同问
Sorry, something went wrong.
@ly1836 你好,我已解决 file的@RequestParam 更换为 @RequestPart
@RequestParam
@RequestPart
@ApiOperation("文件上传") @PostMapping(value = "fileUpload") public Result<FileUpLoadVO> fileUpload(@RequestPart(value= "file") MultipartFile file, @RequestParam(value = "fileTypeEnum")FileTypeEnum fileTypeEnum) { FileUpLoadVO fileUpLoadVO = tencentService.fileUpload(file, fileTypeEnum); if(fileUpLoadVO == null){ return Result.failed("文件上传失败,请检查命名格式!"); } return Result.success(fileUpLoadVO); }
@xiaoymin 建议补充官方doc 文档
No branches or pull requests
参照官方文档很多次尝试,打开doc页面 接口没有 上传按钮的 选项
版本:
<knife4j-spring-boot-starter.version>3.0.3</knife4j-spring-boot-starter.version>
The text was updated successfully, but these errors were encountered: