通过url上传文件-公开链接也加上style

This commit is contained in:
xudawei 2024-05-11 11:46:31 +08:00
parent ab70de2769
commit fabf67fb53

View File

@ -922,11 +922,21 @@ public class FileServiceImpl implements FileService {
return Lists.newArrayList();
}
return httpUrlList.stream().map(item -> SignUrlDownloadResponse.builder()
.signUrl(item)
.signUrl(item + this.buildPublicXImageProcess(dto.getStyle()))
.fileKey(item)
.build()).collect(Collectors.toList());
}
/**
* 构建公开Style
*/
private String buildPublicXImageProcess(String style) {
if (StringUtils.isBlank(style)) {
return "";
}
return "?x-oss-process=" + style;
}
/**
* 构建http链接(非fileKey入参)返回对象
*/