修改fastdfs文件url

This commit is contained in:
zlt
2019-04-21 21:53:10 +08:00
parent a3bfb1896f
commit 5d4c30df4b
2 changed files with 28 additions and 26 deletions
@@ -37,7 +37,7 @@ public class FastdfsAutoConfigure {
@Override
protected void uploadFile(MultipartFile file, FileInfo fileInfo) throws Exception {
StorePath storePath = storageClient.uploadFile(file.getInputStream(), file.getSize(), FilenameUtils.getExtension(file.getOriginalFilename()), null);
fileInfo.setUrl(fileProperties.getFdfs().getWebUrl() + "/" + storePath.getFullPath());
fileInfo.setUrl("http://" + fileProperties.getFdfs().getWebUrl() + "/" + storePath.getFullPath());
fileInfo.setPath(storePath.getFullPath());
}