Browse Source

oss端点优化

test
smallchill 5 years ago
parent
commit
b6dba6d703
  1. 8
      blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java

8
blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java

@ -126,9 +126,9 @@ public class OssEndpoint {
*/
@SneakyThrows
@PostMapping("/put-file")
public R<OssFile> putFile(@RequestParam MultipartFile file) {
public R<BladeFile> putFile(@RequestParam MultipartFile file) {
BladeFile bladeFile = ossBuilder.template().putFile(file.getOriginalFilename(), file.getInputStream());
return R.data(ossBuilder.template().statFile(bladeFile.getName()));
return R.data(bladeFile);
}
/**
@ -140,9 +140,9 @@ public class OssEndpoint {
*/
@SneakyThrows
@PostMapping("/put-file-by-name")
public R<OssFile> putFile(@RequestParam String fileName, @RequestParam MultipartFile file) {
public R<BladeFile> putFile(@RequestParam String fileName, @RequestParam MultipartFile file) {
BladeFile bladeFile = ossBuilder.template().putFile(fileName, file.getInputStream());
return R.data(ossBuilder.template().statFile(bladeFile.getName()));
return R.data(bladeFile);
}
/**

Loading…
Cancel
Save