Browse Source

Add missing response type to cache response

Ben Hsieh 8 years ago
parent
commit
e1f028dcae

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

165
            File file = new File(RNFetchBlobFS.getTmpPath(RNFetchBlob.RCTContext, cacheKey) + ext);
165
            File file = new File(RNFetchBlobFS.getTmpPath(RNFetchBlob.RCTContext, cacheKey) + ext);
166
 
166
 
167
            if (file.exists()) {
167
            if (file.exists()) {
168
-               callback.invoke(null, file.getAbsolutePath());
168
+               callback.invoke(null, RNFetchBlobConst.RNFB_RESPONSE_PATH, file.getAbsolutePath());
169
                return;
169
                return;
170
            }
170
            }
171
        }
171
        }

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

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