diff --git a/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java b/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java index eef29742a..f3e8c3cbe 100644 --- a/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java +++ b/filesystem/android/src/main/java/com/capacitorjs/plugins/filesystem/FilesystemPlugin.java @@ -169,6 +169,8 @@ private void saveFile(PluginCall call, File file, String data) { ex ); call.reject("FILE_NOTCREATED"); + } catch (IllegalArgumentException ex) { + call.reject("The supplied data is not valid base64 content."); } }