Skip to content

Commit c31cb90

Browse files
committed
change android request builder so it wont set Content-Type header to application/octet-stream if it was explicitly set to the empty string. This fixes amazon s3 uploads with a presigned url
1 parent 073cc3c commit c31cb90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,9 @@ else if (value.equalsIgnoreCase("utf8"))
266266
requestType = RequestType.Form;
267267
}
268268
else if(cType.isEmpty()) {
269-
builder.header("Content-Type", "application/octet-stream");
269+
if(!cType.equalsIgnoreCase("")) {
270+
builder.header("Content-Type", "application/octet-stream");
271+
}
270272
requestType = RequestType.SingleFile;
271273
}
272274
if(rawRequestBody != null) {

0 commit comments

Comments
 (0)