Commit a7ccb9d3f6d7198e84b0f3cb112284e5abfa686d

Authored by xp.Huang
2 parents a16f7c3d 8dc38e06

Merge branch 'fix/teambition/2024-10-30' into 'master_dev'

fix:本地文件上传返回非全路径下载地址

See merge request yunteng/thingskit!461
@@ -92,11 +92,10 @@ public class LocalFileStorageService implements FileStorageService { @@ -92,11 +92,10 @@ public class LocalFileStorageService implements FileStorageService {
92 .path(fileName) 92 .path(fileName)
93 .toUriString(); 93 .toUriString();
94 String realDownloadPath = fileDownloadPath.replace(fileStorageProperties.getUploadPath(), ""); 94 String realDownloadPath = fileDownloadPath.replace(fileStorageProperties.getUploadPath(), "");
95 - String ossStaticPath =  
96 - ServletUriComponentsBuilder.fromCurrentContextPath().toUriString() + ossFileUrl;  
97 - ossStaticPath = ossStaticPath.replace("**", fileName); 95 +// String ossStaticPath = ServletUriComponentsBuilder.fromCurrentContextPath().toUriString() + ossFileUrl;
  96 + ossFileUrl = ossFileUrl.replace("**", fileName);
98 return new FileUploadResponse( 97 return new FileUploadResponse(
99 - fileName, realDownloadPath, file.getContentType(), file.getSize(), ossStaticPath); 98 + fileName, realDownloadPath, file.getContentType(), file.getSize(), ossFileUrl);
100 } 99 }
101 100
102 @Override 101 @Override