浏览代码

Add missing response type to cache response

Ben Hsieh 9 年前
父节点
当前提交
e1f028dcae
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1
    1
      src/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
  2. 1
    1
      src/ios/RNFetchBlobNetwork.m

+ 1
- 1
src/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java 查看文件

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 查看文件

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
 		}