|
|
|
@ -28,12 +28,13 @@ public class OssClient implements IOssClient {
|
|
|
|
|
@PostMapping(name = FILE_UPLOAD,consumes = MediaType.MULTIPART_FORM_DATA_VALUE) |
|
|
|
|
public R<BladeFile> fileUpload(@RequestPart("file") MultipartFile file) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OssTemplate minio = ossBuilder.template("minio", "000000"); |
|
|
|
|
if(!minio.bucketExists("op-logs")){ |
|
|
|
|
// 创建bucket
|
|
|
|
|
minio.makeBucket("op-logs"); |
|
|
|
|
} |
|
|
|
|
return R.data(minio.putFile(file)); |
|
|
|
|
return R.data(minio.putFile("op-logs",file.getName(),file)); |
|
|
|
|
|
|
|
|
|
//return R.data(ossBuilder.template("minio","000000").putFile(file));
|
|
|
|
|
} |
|
|
|
|