优化调整
This commit is contained in:
parent
88e98f09f6
commit
045910da80
@ -184,7 +184,7 @@ public class FileServiceImpl implements FileService {
|
||||
@Override
|
||||
public FileInformationResponse multipartUploadFile(MultipartUploadFileDto dto) {
|
||||
File ossFile = multipartUploadAndGetFile(dto);
|
||||
return setFileInfoResp(ossFile);
|
||||
return setFileInfoResp(dto.getFile().getSize(), ossFile);
|
||||
}
|
||||
|
||||
private File multipartUploadAndGetFile(MultipartUploadFileDto dto) {
|
||||
@ -603,4 +603,14 @@ public class FileServiceImpl implements FileService {
|
||||
return resp;
|
||||
}
|
||||
|
||||
private FileInformationResponse setFileInfoResp(long fileSize, File ossFile) {
|
||||
FileInformationResponse resp = new FileInformationResponse();
|
||||
resp.setUrl(ossFile.getFileUrl());
|
||||
resp.setFileName(ossFile.getFileName());
|
||||
resp.setUrlMd5(ossFile.getUrlMd5());
|
||||
resp.setFileKey(ossFile.getFileUuid());
|
||||
resp.setFileSize(fileSize);
|
||||
return resp;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user