marinofaggiana 4 years ago
parent
commit
7d4833bf4a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      iOSClient/Networking/NCNetworking.swift

+ 2 - 2
iOSClient/Networking/NCNetworking.swift

@@ -418,7 +418,7 @@ import Alamofire
         
         if let metadata = NCManageDatabase.sharedInstance.getMetadataInSessionFromFileName(fileName, serverUrl: serverUrl, taskIdentifier: task.taskIdentifier) {
                         
-            NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_progressTask), object: nil, userInfo: ["account":metadata.account, "ocId":metadata.ocId, "serverUrl":serverUrl, "status":NSNumber(value: k_metadataStatusInDownload), "progress":NSNumber(value: progress), "totalBytes":NSNumber(value: totalBytes), "totalBytesExpected":NSNumber(value: totalBytesExpected)])
+            NotificationCenter.default.post(name: Notification.Name.init(rawValue: k_notificationCenter_progressTask), object: nil, userInfo: ["account":metadata.account, "ocId":metadata.ocId, "serverUrl":serverUrl, "status":NSNumber(value: k_metadataStatusInUpload), "progress":NSNumber(value: progress), "totalBytes":NSNumber(value: totalBytes), "totalBytesExpected":NSNumber(value: totalBytesExpected)])
         }
     }
     
@@ -433,7 +433,7 @@ import Alamofire
             
             if error == nil && statusCode >= 200 && statusCode < 300 {
                 
-            } else if error != nil && (error! as NSError).code == -999 {
+            } else if error != nil && (error! as NSError).code == NSURLErrorCancelled {
                 
                 if metadata.status == k_metadataStatusUploadForcedStart {