Merge branch 'feature/REQ-2322' into 'master'
Feature/req 2322 See merge request universal/infrastructure/backend/oss!146
This commit is contained in:
commit
3d26392123
@ -24,5 +24,9 @@ public class ApiSignUrlDownloadResponse {
|
||||
* 文件 Key
|
||||
*/
|
||||
private String fileKey;
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
}
|
||||
|
||||
@ -25,4 +25,9 @@ public class SignUrlDownloadResponse {
|
||||
*/
|
||||
private String fileKey;
|
||||
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
private String fileName;
|
||||
|
||||
}
|
||||
|
||||
@ -898,12 +898,14 @@ public class FileServiceImpl implements FileService {
|
||||
return SignUrlDownloadResponse.builder()
|
||||
.signUrl(this.buildPublicXImageProcess(url, style))
|
||||
.fileKey(item.getFileUuid())
|
||||
.fileName(item.getFileName())
|
||||
.build();
|
||||
case PRIVATE_BUCKET://私有桶 - 临时授权链接 例如 http://xxx.png?Expire=a&AccessKeyId=b&Signature=c&repsonse-content-disposition=d
|
||||
String signUrl = this.fileManager.signUrlDownload(item.getBucketName(), tgtFileKey, Objects.nonNull(expire) ? expire : SIGN_URL_DOWNLOAD_EXPIRE_SECOND , item.getChannelCode(), item.getFileName(), style, hasFileName);
|
||||
return SignUrlDownloadResponse.builder()
|
||||
.signUrl(UrlUtil.httpToHttps(signUrl))
|
||||
.fileKey(item.getFileUuid())
|
||||
.fileName(item.getFileName())
|
||||
.build();
|
||||
default:
|
||||
BizException.error(CodeEnum.CHANNEL_TYPE_NOT_EXIST);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user