Browse Source

fix: 修复上传路径

master_tdsql
hxh 9 months ago
parent
commit
cc8642465d
  1. 6
      shuili-framework/src/main/java/com/shuili/common/utils/FileUploadUtils.java

6
shuili-framework/src/main/java/com/shuili/common/utils/FileUploadUtils.java

@ -111,7 +111,11 @@ public class FileUploadUtils {
} }
targetFile.createNewFile(); targetFile.createNewFile();
file.transferTo(targetFile); file.transferTo(targetFile);
return Constants.RESOURCE_PREFIX + localSubPath; if (Constants.RESOURCE_PREFIX.endsWith(File.separator)) {
return Constants.RESOURCE_PREFIX + localSubPath;
} else {
return Constants.RESOURCE_PREFIX + File.separator + localSubPath;
}
} }
/** /**

Loading…
Cancel
Save