diff --git a/src/main/java/org/ntlab/nemophila/utils/Base64Decode.java b/src/main/java/org/ntlab/nemophila/utils/Base64Decode.java index cff8baf..5c8686b 100644 --- a/src/main/java/org/ntlab/nemophila/utils/Base64Decode.java +++ b/src/main/java/org/ntlab/nemophila/utils/Base64Decode.java @@ -5,8 +5,6 @@ public class Base64Decode { private static void saveAsFile(String path, String enImage) throws IOException{ - byte[] deData = Base64.getDecoder().decode(enImage); - File file = new File(path); if(enImage == null) { @@ -14,6 +12,8 @@ return; } + byte[] deData = Base64.getDecoder().decode(enImage); + file.getParentFile().mkdir(); file.createNewFile();