|
@@ -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 {
|
|
|
|