Sfoglia il codice sorgente

Add missing response type to cache response

Ben Hsieh 8 anni fa
parent
commit
e1f028dcae

+ 1
- 1
src/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java Vedi File

@@ -165,7 +165,7 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable {
165 165
            File file = new File(RNFetchBlobFS.getTmpPath(RNFetchBlob.RCTContext, cacheKey) + ext);
166 166
 
167 167
            if (file.exists()) {
168
-               callback.invoke(null, file.getAbsolutePath());
168
+               callback.invoke(null, RNFetchBlobConst.RNFB_RESPONSE_PATH, file.getAbsolutePath());
169 169
                return;
170 170
            }
171 171
        }

+ 1
- 1
src/ios/RNFetchBlobNetwork.m Vedi File

@@ -156,7 +156,7 @@ NSOperationQueue *taskQueue;
156 156
 
157 157
 			destPath = [RNFetchBlobFS getTempPath:cacheKey withExtension:[self.options valueForKey:CONFIG_FILE_EXT]];
158 158
             if ([[NSFileManager defaultManager] fileExistsAtPath:destPath]) {
159
-				callback(@[[NSNull null], destPath]);
159
+				callback(@[[NSNull null], RESP_TYPE_PATH, destPath]);
160 160
                 return;
161 161
             }
162 162
 		}