!61 修复创建邮件附件时路径不存在的bug

Merge pull request !61 from zrc/master
pull/62/head
Java3y 5 months ago committed by Gitee
commit b64a2258f6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -40,9 +40,9 @@ public class AustinFileUtils {
URL url = new URL(remoteUrl);
File file = new File(path, url.getPath());
inputStream = url.openStream();
fileOutputStream = new FileOutputStream(file);
if (!file.exists()) {
file.getParentFile().mkdirs();
fileOutputStream = new FileOutputStream(file);
IoUtil.copy(inputStream, fileOutputStream);
}
return file;

Loading…
Cancel
Save