| | |
| | | |
| | | List<StorageBlobDTO> updateStorageBlobs(List<MultipartFile> files, String bucketName,Long type); |
| | | |
| | | List<StorageBlobDTO> updateStorageBlob(MultipartFile file, String bucketName, Long type); |
| | | |
| | | |
| | | /** |
| | | * 批量删除文件 |
| | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | return storageBlobDTOs; |
| | | } |
| | | |
| | | @Override |
| | | public List<StorageBlobDTO> updateStorageBlob(MultipartFile file, String bucketName, Long type) { |
| | | return updateStorageBlobs(Collections.singletonList(file), bucketName, type); |
| | | } |
| | | |
| | | private StorageBlobDTO buildStorageBlobDTO(MultipartFile file, MinioResult res, String bucketName, Long type) { |
| | | StorageBlobDTO dto = new StorageBlobDTO(); |
| | | dto.setContentType(file.getContentType()); |
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * minio通用上传请求(单个)
|
| | | */
|
| | | @PostMapping("/minioUpload")
|
| | | @ApiOperation(value = "minio通用上传请求")
|
| | | public AjaxResult minioUploadFile(MultipartFile file, String bucketName, Long type) throws Exception
|
| | | {
|
| | | return AjaxResult.success(storageBlobService.updateStorageBlob(file, bucketName,type));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 通用上传请求(单个)
|
| | | */
|
| | | @PostMapping("/upload")
|