Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 1c73284

Browse files
committed
Fix #225 IOS upload progress
1 parent 5e0633d commit 1c73284

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/ios/RNFetchBlobNetwork.m

+8
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,19 @@ + (NSArray *) getCookies:(NSString *) url
159159

160160
+ (void) enableProgressReport:(NSString *) taskId config:(RNFetchBlobProgress *)config
161161
{
162+
if(progressTable == nil)
163+
{
164+
progressTable = [[NSMutableDictionary alloc] init];
165+
}
162166
[progressTable setValue:config forKey:taskId];
163167
}
164168

165169
+ (void) enableUploadProgress:(NSString *) taskId config:(RNFetchBlobProgress *)config
166170
{
171+
if(uploadProgressTable == nil)
172+
{
173+
uploadProgressTable = [[NSMutableDictionary alloc] init];
174+
}
167175
[uploadProgressTable setValue:config forKey:taskId];
168176
}
169177

0 commit comments

Comments
 (0)