diff --git a/dcav-uploader/ViewController.swift b/dcav-uploader/ViewController.swift index b326f20..981fafd 100644 --- a/dcav-uploader/ViewController.swift +++ b/dcav-uploader/ViewController.swift @@ -76,9 +76,11 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP } self.responseString = String(data: data, encoding: .utf8)! print("responseString = \(String(describing: self.responseString))") + + self.dcavTextField.text = "https://dcav.pw/\(String(describing: self.labell.text![(self.labell.text!.startIndex)]))\(String(describing: self.responseString!))" } + task.resume() - dcavTextField.text = "https://dcav.pw/\(String(describing: self.labell.text![(self.labell.text!.startIndex)]))\(String(describing: responseString))" } @@ -90,7 +92,7 @@ class ViewController: UIViewController, UINavigationControllerDelegate, UIImageP func generateRequest(user: String, pass: String) -> URLRequest { let params : [String : String] = [ "user": user, "pass": pass ] - let url = URL(string: "http://192.168.0.119:35257/upload") + let url = URL(string: UserDefaults.standard.string(forKey: "endpoint_preference")!) let boundary = generateBoundaryString()