lyhzzz 6 months ago
parent
commit
3cf6616875

+ 2 - 1
src/main/java/com/fdkankan/fusion/service/impl/UploadService.java

@@ -100,7 +100,8 @@ public class UploadService {
             if(!uploadToOssUtil.existKey(filePathAdd + fileName + suffixName)){
             if(!uploadToOssUtil.existKey(filePathAdd + fileName + suffixName)){
                 throw new BusinessException(ResultCode.UPLOAD_ERROR.code,ResultCode.UPLOAD_ERROR.msg);
                 throw new BusinessException(ResultCode.UPLOAD_ERROR.code,ResultCode.UPLOAD_ERROR.msg);
             }
             }
-            return queryPath +filePathAdd+ URLEncoder.encode(fileName,"utf-8") + suffixName;
+
+            return queryPath +filePathAdd+ URLEncoder.encode(fileName,"utf-8").replaceAll("+", "%20") + suffixName;
         }catch (Exception e){
         }catch (Exception e){
             log.info("upload-error:{}",e);
             log.info("upload-error:{}",e);
             throw new BusinessException(ResultCode.UPLOAD_ERROR.code,ResultCode.UPLOAD_ERROR.msg);
             throw new BusinessException(ResultCode.UPLOAD_ERROR.code,ResultCode.UPLOAD_ERROR.msg);