feat:获取文件名接口
This commit is contained in:
+15
-3
@@ -260,11 +260,23 @@ public class ReportManageConroller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传文件
|
* 获取文件名
|
||||||
* @param file
|
* @param fileId
|
||||||
* @return
|
* @return
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
|
@ApiOperation(value = "根据文件id获取文件名")
|
||||||
|
@GetMapping("/fileName")
|
||||||
|
public ResponseMessage getFileNameById(String fileId) {
|
||||||
|
FileEntity file = fileService.getFile(fileId);
|
||||||
|
return Result.success(file.getFileName());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
* @param file
|
||||||
|
* @return
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
@ApiOperation(value = "详情||上传文件")
|
@ApiOperation(value = "详情||上传文件")
|
||||||
@PostMapping("/uploadFile")
|
@PostMapping("/uploadFile")
|
||||||
public ResponseMessage<Map<String, Object>> uploadFile(MultipartFile file) throws IOException {
|
public ResponseMessage<Map<String, Object>> uploadFile(MultipartFile file) throws IOException {
|
||||||
|
|||||||
Reference in New Issue
Block a user