Browse Source

Merge branch '0.10.7' of github.com:wkh237/react-native-fetch-blob into 0.10.7

Ben Hsieh 7 years ago
parent
commit
dd4dbb272e
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java

+ 2
- 3
android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java View File

@@ -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
                 }