Commit 8dc38e06500c607c5b9fda215ded91b575fafd84

Authored by lijianfa_14810364212
1 parent a481b5eb

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

@@ -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