临时授权下载接口-返回fileName
This commit is contained in:
parent
a936fb75be
commit
c20dbd6caa
@ -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;
|
||||
|
||||
}
|
||||
|
||||
@ -896,12 +896,14 @@ public class FileServiceImpl implements FileService {
|
||||
return SignUrlDownloadResponse.builder()
|
||||
.signUrl(url)
|
||||
.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());
|
||||
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