Merge remote-tracking branch 'ztcloud/test' into dev

This commit is contained in:
yangchaojin
2026-01-29 15:09:44 +08:00
18 changed files with 492 additions and 5 deletions

View File

@@ -85,6 +85,7 @@ public class FileController {
String baseUrl = buildPublicBaseUrl(request); // 见下方函数
String decryptUrl = baseUrl + "/admin-api/infra/file/preview-decrypt?fileId=" + fileId + "&token=" + token;
fileRespVO.setUrl(decryptUrl);
log.info("decryptUrl={}, urlFieldAfterSet={}", decryptUrl, fileRespVO.getUrl());
}
return success(fileRespVO);

View File

@@ -64,6 +64,8 @@ public class FileRespVO {
private String previewUrl;
public String getPreviewUrl() {
log.info("GET /infra/file/get this.downloadable={}, this.url={}, isEncrypted={}",
this.downloadable, this.url, this.isEncrypted);
// 不可下载不返回 previewUrl
if (Boolean.FALSE.equals(this.downloadable) ) {
return null;