 //                    
 //                }
                 switch encodingResult{
-                case .success(request: _, streamingFromDisk: _, streamFileURL: _):
-                    completion(true,"\(currentTime)")
+                case .success(request: let upload, streamingFromDisk: _, streamFileURL: _):
+                    upload.responseJSON(completionHandler: { (json) in
+                        let dict = json.result.value as? [String:Any] ?? [:]
+                        
+                        let code = (dict["code"] as? Int) ?? -1
+                        if code == 0{
+                            completion(true,"\(currentTime)")
+                            return
+                        }
+                        completion(false,nil)
+                    })
                     return
                 case .failure(_):
                     completion(false,nil)

            }, to: url, encodingCompletion: { (encodingResult) in
                switch encodingResult{
                case .success(request: let upload, streamingFromDisk: _, streamFileURL: _):
                    upload.responseString(completionHandler: { (_) in
                        completion(true)
                    })
                    
                    return

        let fileManager = FileManager.default
        let rootPath = NSSearchPathForDirectoriesInDomains(.documentDirectory,.userDomainMask, true)[0] as String
        let filePath = "\(rootPath)/verify.jpg"
        let imageData = UIImageJPEGRepresentation(uploadimg, 0.4)
        fileManager.createFile(atPath: filePath, contents: imageData, attributes: nil)
        
        if fileManager.fileExists(atPath: filePath){
