ai预警上传文件路径重复/修复
This commit is contained in:
parent
01e4c53cee
commit
d47a774e18
@ -330,7 +330,8 @@ public class UploadFileServiceImpl implements UploadFileService {
|
||||
@Override
|
||||
public String uploadUrlReturnFileName(String url, String relativePath) {
|
||||
FileInfo fileInfo = fileStorageService.of(UrlUtil.uploadImgUrlToMultipartFile(url)).setPath(relativePath).upload();
|
||||
return relativePath + "/" + fileInfo.getFilename();
|
||||
String cleanPath = relativePath.replaceAll("/+$", "");
|
||||
return cleanPath + "/" + fileInfo.getFilename();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user