From ed3b1132065eb33d846a2e70c334049ed7d3319f Mon Sep 17 00:00:00 2001 From: Ciprian Caba Date: Tue, 21 Aug 2018 17:31:40 +0100 Subject: [PATCH] Update RNFetchBlobReq.java Fixes the issue described here in relation to uploading to S3 https://github.com/wkh237/react-native-fetch-blob/issues/425 --- android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java b/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java index 8a81a832e..19e8fdc7f 100644 --- a/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java +++ b/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java @@ -246,7 +246,9 @@ else if (value.equalsIgnoreCase("utf8")) requestType = RequestType.Form; } else if(cType.isEmpty()) { - builder.header("Content-Type", "application/octet-stream"); + if(!cType.equalsIgnoreCase("")) { + builder.header("Content-Type", "application/octet-stream"); + } requestType = RequestType.SingleFile; } if(rawRequestBody != null) {