From 31d65c96e0711b827f667cff637c34624447c515 Mon Sep 17 00:00:00 2001 From: Ros Mc Mahon Date: Fri, 1 May 2020 16:48:50 +0100 Subject: [PATCH] fix(android): make readFile not add newlines on base64 strings (#2857) --- .../src/main/java/com/getcapacitor/plugin/Filesystem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/capacitor/src/main/java/com/getcapacitor/plugin/Filesystem.java b/android/capacitor/src/main/java/com/getcapacitor/plugin/Filesystem.java index c5fd98e130..e699dd79c4 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/plugin/Filesystem.java +++ b/android/capacitor/src/main/java/com/getcapacitor/plugin/Filesystem.java @@ -144,7 +144,7 @@ private String readFileAsBase64EncodedData(InputStream is) throws IOException { } fileInputStreamReader.close(); - return new String(Base64.encodeToString(byteStream.toByteArray(), Base64.DEFAULT)); + return new String(Base64.encodeToString(byteStream.toByteArray(), Base64.NO_WRAP)); } @PluginMethod()