File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,12 @@ - (void) sendRequest:(__weak NSDictionary * _Nullable )options
100
100
uploadTask = [options valueForKey: @" IOSUploadTask" ] == nil ? NO : [[options valueForKey: @" IOSUploadTask" ] boolValue ];
101
101
102
102
NSString * filepath = [options valueForKey: @" uploadFilePath" ];
103
+
104
+ if (uploadTask && ![[NSFileManager defaultManager ] fileExistsAtPath: filepath]) {
105
+ RCTLog (@" [RNFetchBlobRequest] sendRequest uploadTask file doesn't exist %@ " , filepath);
106
+ callback (@[@" uploadTask file doesn't exist" , @" " , [NSNull null ]]);
107
+ return ;
108
+ }
103
109
104
110
// when followRedirect not set in options, defaults to TRUE
105
111
followRedirect = [options valueForKey: @" followRedirect" ] == nil ? YES : [[options valueForKey: @" followRedirect" ] boolValue ];
You can’t perform that action at this time.
0 commit comments