未验证 提交 5381ac38 编写于 作者: S sick-cat 提交者: GitHub

服务器部署,找不到生成的临时文件。改用绝对路径 (#580)

Co-authored-by: Nyanzhao.jia <yanzhao.jia@aelcn.com>
上级 0b83ca06
......@@ -95,7 +95,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
File file = null;
try {
// 用uuid作为文件名,防止生成的临时文件重复
file = File.createTempFile(IdUtil.simpleUUID(), prefix);
file = new File(SYS_TEM_DIR + IdUtil.simpleUUID() + prefix);
// MultipartFile to File
multipartFile.transferTo(file);
} catch (IOException e) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册