Browse Source

fix notificationCenterProgressTask chunked upload

Signed-off-by: marinofaggiana <ios@nextcloud.com>
marinofaggiana 2 years ago
parent
commit
ea472b0711
1 changed files with 3 additions and 3 deletions
  1. 3 3
      iOSClient/Networking/NCNetworkingChunkedUpload.swift

+ 3 - 3
iOSClient/Networking/NCNetworkingChunkedUpload.swift

@@ -92,9 +92,9 @@ extension NCNetworking {
                 }, progressHandler: { progress in
 
                     if let size = size {
-                        let totalBytesExpected = size + progress.completedUnitCount
-                        let totalBytes = metadata.size
-                        let fractionCompleted = Float(totalBytesExpected) / Float(totalBytes)
+                        let totalBytesExpected = metadata.size
+                        let totalBytes = size + progress.completedUnitCount
+                        let fractionCompleted = Float(totalBytes) / Float(totalBytesExpected)
 
                         NotificationCenter.default.postOnMainThread(
                             name: NCGlobal.shared.notificationCenterProgressTask,