|
@@ -148,13 +148,12 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable {
|
148
|
148
|
if(options.addAndroidDownloads.hasKey("path")) {
|
149
|
149
|
req.setDestinationUri(Uri.parse("file://" + options.addAndroidDownloads.getString("path")));
|
150
|
150
|
}
|
151
|
|
- // set headers
|
152
|
|
- ReadableMapKeySetIterator it = headers.keySetIterator();
|
153
|
151
|
// #391 Add MIME type to the request
|
154
|
152
|
if(options.addAndroidDownloads.hasKey("mime")) {
|
155
|
153
|
req.setMimeType(options.addAndroidDownloads.getString("mime"));
|
156
|
154
|
}
|
157
|
|
-
|
|
155
|
+ // set headers
|
|
156
|
+ ReadableMapKeySetIterator it = headers.keySetIterator();
|
158
|
157
|
if(options.addAndroidDownloads.hasKey("mediaScannable") && options.addAndroidDownloads.hasKey("mediaScannable") == true ) {
|
159
|
158
|
req.allowScanningByMediaScanner();
|
160
|
159
|
}
|