|
@@ -325,6 +325,8 @@ NSOperationQueue *taskQueue;
|
325
|
325
|
[writeStream write:[data bytes] maxLength:[data length]];
|
326
|
326
|
}
|
327
|
327
|
RNFetchBlobProgress * pconfig = [progressTable valueForKey:taskId];
|
|
328
|
+ if(expectedBytes == 0)
|
|
329
|
+ return;
|
328
|
330
|
NSNumber * now =[NSNumber numberWithFloat:((float)receivedBytes/(float)expectedBytes)];
|
329
|
331
|
if(pconfig != nil && [pconfig shouldReport:now])
|
330
|
332
|
{
|
|
@@ -430,6 +432,8 @@ NSOperationQueue *taskQueue;
|
430
|
432
|
- (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didSendBodyData:(int64_t)bytesSent totalBytesSent:(int64_t)totalBytesWritten totalBytesExpectedToSend:(int64_t)totalBytesExpectedToWrite
|
431
|
433
|
{
|
432
|
434
|
RNFetchBlobProgress * pconfig = [uploadProgressTable valueForKey:taskId];
|
|
435
|
+ if(totalBytesExpectedToWrite == 0)
|
|
436
|
+ return;
|
433
|
437
|
NSNumber * now = [NSNumber numberWithFloat:((float)totalBytesWritten/(float)totalBytesExpectedToWrite)];
|
434
|
438
|
if(pconfig != nil && [pconfig shouldReport:now]) {
|
435
|
439
|
[self.bridge.eventDispatcher
|