Commit 2f0f4c25 by 袁伟铭

1.0.0

parent 1514dafc
......@@ -113,15 +113,16 @@ public class UploadUtils {
public static String tempToFormal(String tempPath) {
Path path = Paths.get(tempPath);
File formal = new File(tempPath.replace("/temp", ""));
String formalPath = tempPath.replace("/temp", "");
File formalFile = new File(formalPath);
try {
FileUtils.writeByteArrayToFile(formal, Files.readAllBytes(path));
FileUtils.writeByteArrayToFile(formalFile, Files.readAllBytes(path));
Files.delete(path);
} catch (IOException e) {
log.error("文件转存失败:{}", e.getMessage());
throw new BusinessException("文件转存失败");
}
return tempPath.replace("/temp", "");
return formalPath;
}
/*public static void main(String[] args) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment