Merge pull request #310 from gitchenjh/master

修复文件名包含空格时不能预览 #294
pull/35/head
gitchenjh 2021-11-25 16:11:35 +08:00 committed by GitHub
commit ded297de59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ public class DownloadUtils {
* @return
*/
public static ReturnResponse<String> downLoad(FileAttribute fileAttribute, String fileName) {
String urlStr = fileAttribute.getUrl();
String urlStr = fileAttribute.getUrl().replaceAll("\\+", "%20");
ReturnResponse<String> response = new ReturnResponse<>(0, "下载成功!!!", "");
String realPath = DownloadUtils.getRelFilePath(fileName, fileAttribute);
try {