瀏覽代碼

Add missing response type to cache response

Ben Hsieh 8 年之前
父節點
當前提交
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,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 查看文件

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