marinofaggiana 4 years ago
parent
commit
236dc202ea
1 changed files with 10 additions and 0 deletions
  1. 10 0
      iOSClient/Networking/NCNetworking.swift

+ 10 - 0
iOSClient/Networking/NCNetworking.swift

@@ -329,6 +329,8 @@ import Alamofire
                 #endif
             } else if background {
                 uploadFileInBackground(metadata: metadataForUpload!, account: account, completion: completion)
+            } else {
+                uploadFile(metadata: metadataForUpload!, account: account, completion: completion)
             }
            
         } else {
@@ -358,11 +360,19 @@ import Alamofire
                     #endif
                 } else if background {
                     self.uploadFileInBackground(metadata: metadataForUpload!, account: account, completion: completion)
+                } else {
+                    self.uploadFile(metadata: metadataForUpload!, account: account, completion: completion)
                 }
             }
         }
     }
     
+    //
+    private func uploadFile(metadata: tableMetadata, account: tableAccount, completion: @escaping (_ errorCode: Int, _ errorDescription: String)->()) {
+        
+        completion(0, "")
+    }
+    
     private func uploadFileInBackground(metadata: tableMetadata, account: tableAccount, completion: @escaping (_ errorCode: Int, _ errorDescription: String)->()) {
         
         var session: URLSession?