Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 8a75a9b

Browse files
jsmwkh237
authored andcommitted
Set mime if set in addAndroidDownloads (#421)
1 parent c217fab commit 8a75a9b

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
@@ -148,6 +148,9 @@ public void run() {
148148
if(options.addAndroidDownloads.hasKey("path")) {
149149
req.setDestinationUri(Uri.parse("file://" + options.addAndroidDownloads.getString("path")));
150150
}
151+
if(options.addAndroidDownloads.hasKey("mime")) {
152+
req.setMimeType(options.addAndroidDownloads.getString("mime"));
153+
}
151154
// set headers
152155
ReadableMapKeySetIterator it = headers.keySetIterator();
153156
while (it.hasNextKey()) {

0 commit comments

Comments
 (0)