Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
5381ac38
Unverified
Commit
5381ac38
authored
Jan 31, 2021
by
sick-cat
Committed by
GitHub
Jan 31, 2021
Browse files
服务器部署,找不到生成的临时文件。改用绝对路径 (#580)
Co-authored-by:
yanzhao.jia
<
yanzhao.jia@aelcn.com
>
parent
0b83ca06
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-common/src/main/java/me/zhengjie/utils/FileUtil.java
View file @
5381ac38
...
@@ -95,7 +95,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
...
@@ -95,7 +95,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil {
File
file
=
null
;
File
file
=
null
;
try
{
try
{
// 用uuid作为文件名,防止生成的临时文件重复
// 用uuid作为文件名,防止生成的临时文件重复
file
=
File
.
createTempFile
(
IdUtil
.
simpleUUID
()
,
prefix
);
file
=
new
File
(
SYS_TEM_DIR
+
IdUtil
.
simpleUUID
()
+
prefix
);
// MultipartFile to File
// MultipartFile to File
multipartFile
.
transferTo
(
file
);
multipartFile
.
transferTo
(
file
);
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment