Skip to content

Commit 51f0213

Browse files
committed
Set mime if set in addAndroidDownloads (wkh237#421)
1 parent 7626552 commit 51f0213

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

+3
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ public void run() {
150150
if(options.addAndroidDownloads.hasKey("path")) {
151151
req.setDestinationUri(Uri.parse("file://" + options.addAndroidDownloads.getString("path")));
152152
}
153+
if(options.addAndroidDownloads.hasKey("mime")) {
154+
req.setMimeType(options.addAndroidDownloads.getString("mime"));
155+
}
153156
// set headers
154157
ReadableMapKeySetIterator it = headers.keySetIterator();
155158
while (it.hasNextKey()) {

0 commit comments

Comments
 (0)