瀏覽代碼

fix file exists check

Guy Blank 5 年之前
父節點
當前提交
8d06e9c497
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      ios/RNFetchBlobRequest.m

+ 1
- 1
ios/RNFetchBlobRequest.m 查看文件

@@ -101,7 +101,7 @@ typedef NS_ENUM(NSUInteger, ResponseFormat) {
101 101
     
102 102
     NSString * filepath = [options valueForKey:@"uploadFilePath"];
103 103
 
104
-    if (uploadTask && ![[NSFileManager defaultManager] fileExistsAtPath:filepath]) {
104
+    if (uploadTask && ![[NSFileManager defaultManager] fileExistsAtPath:[NSURL URLWithString:filepath].path]) {
105 105
         RCTLog(@"[RNFetchBlobRequest] sendRequest uploadTask file doesn't exist %@", filepath);
106 106
         callback(@[@"uploadTask file doesn't exist", @"", [NSNull null]]);
107 107
         return;