Merge branch 'test-training2' of https://git.code.tencent.com/lian-cbtc/rtss-server into test-training2-xzb1
This commit is contained in:
commit
23b169bb3b
@ -23,6 +23,11 @@ public class MinioController {
|
|||||||
return minioService.preSignedObjectUrl(directory, fileName, method);
|
return minioService.preSignedObjectUrl(directory, fileName, method);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/downloadUrl")
|
||||||
|
public String downloadUrl(String directory, String fileName) {
|
||||||
|
return minioService.downloadObjectUrl(directory, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/file/save")
|
@PostMapping("/file/save")
|
||||||
public void saveFile(@RequestAttribute AccountVO user, @RequestBody MinioFileInfo fileInfo) {
|
public void saveFile(@RequestAttribute AccountVO user, @RequestBody MinioFileInfo fileInfo) {
|
||||||
minioService.saveFileInfo(user, fileInfo);
|
minioService.saveFileInfo(user, fileInfo);
|
||||||
|
@ -34,4 +34,6 @@ public interface MinioService {
|
|||||||
* 更新文件信息
|
* 更新文件信息
|
||||||
*/
|
*/
|
||||||
void update(MinioFileInfo fileInfo);
|
void update(MinioFileInfo fileInfo);
|
||||||
|
|
||||||
|
String downloadObjectUrl(String directory, String fileName);
|
||||||
}
|
}
|
||||||
|
@ -80,4 +80,10 @@ public class MinioServiceImpl implements MinioService {
|
|||||||
public void update(MinioFileInfo fileInfo) {
|
public void update(MinioFileInfo fileInfo) {
|
||||||
minioFileInfoDao.updateByPrimaryKeySelective(fileInfo);
|
minioFileInfoDao.updateByPrimaryKeySelective(fileInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String downloadObjectUrl(String directory, String fileName) {
|
||||||
|
MinioClientUtil minioClientUtil = createMinioClientUtil(directory);
|
||||||
|
return minioClientUtil.getDownLoadPath(fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user