Skip to content

Commit de8b50d

Browse files
authoredJul 9, 2024··
fix(android): send FormData on older devices (#7519)
1 parent 4009d23 commit de8b50d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎android/capacitor/src/main/java/com/getcapacitor/plugin/util/CapacitorHttpUrlConnection.java

+2
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ private void writeFormDataRequestBody(String contentType, JSArray entries) throw
289289

290290
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
291291
os.write(Base64.getDecoder().decode(value));
292+
} else {
293+
os.write(android.util.Base64.decode(value, android.util.Base64.DEFAULT));
292294
}
293295

294296
os.writeBytes(lineEnd);

0 commit comments

Comments
 (0)
Please sign in to comment.