Skip to content

Commit

Permalink
服务器部署,找不到生成的临时文件。改用绝对路径 (elunez#580)
Browse files Browse the repository at this point in the history
Co-authored-by: yanzhao.jia <[email protected]>
  • Loading branch information
imJYZ and yanzhao.jia authored Jan 31, 2021
1 parent 0b83ca0 commit 5381ac3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static File toFile(MultipartFile multipartFile) {
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) {
Expand Down

0 comments on commit 5381ac3

Please sign in to comment.