leo.xie 3 年 前
コミット
3ec0e773c4
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1 1
      src/main/java/com/ads/business/service/impl/DocServiceImpl.java

+ 1 - 1
src/main/java/com/ads/business/service/impl/DocServiceImpl.java

@@ -334,7 +334,7 @@ public class DocServiceImpl extends ServiceImpl<DocDao, Doc> implements DocServi
             //如果目标文件所在的目录不存在,则创建父目录
             fromFile.getParentFile().mkdirs();
         }
-        String pictureFilePath = docUrl.replace(domain,pictureConfig.getBasePath());
+        String pictureFilePath = docUrl.replace(domain+"file",pictureConfig.getBasePath());
         if(!new File(pictureFilePath).exists()){
             throw new BusinessException("当前图片不存在"+pictureFilePath+"&"+domain+"&"+pictureConfig.getBasePath());
         }