Bläddra i källkod

fix file exists check

Guy Blank 7 år sedan
förälder
incheckning
8d06e9c497
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      ios/RNFetchBlobRequest.m

+ 1
- 1
ios/RNFetchBlobRequest.m Visa fil

101
     
101
     
102
     NSString * filepath = [options valueForKey:@"uploadFilePath"];
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
         RCTLog(@"[RNFetchBlobRequest] sendRequest uploadTask file doesn't exist %@", filepath);
105
         RCTLog(@"[RNFetchBlobRequest] sendRequest uploadTask file doesn't exist %@", filepath);
106
         callback(@[@"uploadTask file doesn't exist", @"", [NSNull null]]);
106
         callback(@[@"uploadTask file doesn't exist", @"", [NSNull null]]);
107
         return;
107
         return;