设置文件Key

This commit is contained in:
刘才福 2022-11-18 11:29:14 +08:00
parent 6ed59396ad
commit b4d06b8e6a
3 changed files with 17 additions and 7 deletions

View File

@ -21,4 +21,8 @@ public class FileInformationVo {
* URL MD5
*/
private String urlMd5;
/**
* 文件 Key
*/
private String fileKey;
}

View File

@ -21,4 +21,8 @@ public class FileInformationResponse {
* URL MD5
*/
private String urlMd5;
/**
* 文件 Key
*/
private String fileKey;
}

View File

@ -270,11 +270,13 @@ public class FileServiceImpl implements FileService {
return response;
}
private FileInformationResponse setFileInfoResp(File ossFile) {
FileInformationResponse resp = new FileInformationResponse();
resp.setUrl(ossFile.getFileUrl());
resp.setFileName(ossFile.getFileName());
resp.setUrlMd5(ossFile.getUrlMd5());
return resp;
}
private FileInformationResponse setFileInfoResp(File ossFile){
FileInformationResponse resp=new FileInformationResponse();
resp.setUrl(ossFile.getFileUrl());
resp.setFileName(ossFile.getFileName());
resp.setUrlMd5(ossFile.getUrlMd5());
resp.setFileKey(ossFile.getFileUuid());
return resp;
}
}