| | |
| | | * @return ObjectStat |
| | | */ |
| | | @SneakyThrows |
| | | @PostMapping("/put-file-by-prefix") |
| | | public R<BladeFile> putFileByPrefix(@RequestParam MultipartFile file,@RequestParam(required = false) String prefixPath) { |
| | | BladeFile bladeFile = ossBuilder.templateByPrefix(prefixPath).putFile(file.getOriginalFilename(), file.getInputStream()); |
| | | return R.data(bladeFile); |
| | | } |
| | | |
| | | /** |
| | | * 上传文件并保存至附件表 |
| | | * |
| | | * @param file 文件 |
| | | * @return ObjectStat |
| | | */ |
| | | @SneakyThrows |
| | | @PostMapping("/put-file-attach") |
| | | public R<BladeFile> putFileAttach(@RequestParam MultipartFile file) { |
| | | String fileName = file.getOriginalFilename(); |