Guest User

Untitled

a guest
Jun 19th, 2018
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.20 KB | None | 0 0
  1. 2018-06-19 12:06:56.076335+0200 google01[4054:1274269] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
  2. 2018-06-19 12:06:56.077701+0200 google01[4054:1274269] [MC] Reading from public effective user settings.
  3. 2018-06-19 12:06:56.077701+0200 google01[4054:1274269] [MC] Reading from public effective user settings.
  4. 2018-06-19 12:07:00.633120+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  5. 2018-06-19 12:07:00.644399+0200 google01[4054:1274552] [discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}
  6. 2018-06-19 12:07:00.668971+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  7. 2018-06-19 12:07:00.715021+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  8. 2018-06-19 12:07:00.727139+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  9. 2018-06-19 12:07:00.802869+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_write: line 3420 length is zero
  10. 2018-06-19 12:07:00.803070+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  11. 2018-06-19 12:07:00.814943+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_write: line 3420 length is zero
  12. 2018-06-19 12:07:00.815057+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  13. 2018-06-19 12:07:00.851161+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_write: line 3420 length is zero
  14. 2018-06-19 12:07:00.851395+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  15. 2018-06-19 12:07:00.855101+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_write: line 3420 length is zero
  16. 2018-06-19 12:07:00.855244+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  17. 2018-06-19 12:07:00.867205+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  18. 2018-06-19 12:07:00.883086+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_write: line 3420 length is zero
  19. 2018-06-19 12:07:00.883189+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  20. 2018-06-19 12:07:00.891112+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_write: line 3420 length is zero
  21. 2018-06-19 12:07:00.891201+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_errorlog: line 2878 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library
  22. 2018-06-19 12:07:00.907172+0200 google01[4054:1274376] [BoringSSL] Function boringssl_session_write: line 3420 length is zero
  23.  
  24. ... (the same repeating lines of code but 100x times) and
  25.  
  26. 2018-06-19 12:09:02.226689+0200 google01[4054:1275279] [BoringSSL] Function boringssl_session_errorlog: line 2881 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert
  27. 2018-06-19 12:09:02.227160+0200 google01[4054:1275279] [BoringSSL] Function boringssl_session_errorlog: line 2881 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert
  28. 2018-06-19 12:09:02.227357+0200 google01[4054:1275279] [BoringSSL] Function boringssl_session_errorlog: line 2881 [boringssl_session_read] SSL_ERROR_ZERO_RETURN(6): operation failed because the connection was cleanly shut down with a close_notify alert
  29. 2018-06-19 12:09:02.227508+0200 google01[4054:1275279] TIC Read Status [1:0x1c0166d80]: 1:57
  30. 2018-06-19 12:09:02.227649+0200 google01[4054:1275279] TIC Read Status [1:0x1c0166d80]: 1:57
  31. 2018-06-19 12:09:02.227739+0200 google01[4054:1275279] TIC Read Status [1:0x1c0166d80]: 1:57
  32.  
  33. import UIKit
  34.  
  35. class uploadCustom: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate {
  36.  
  37. @IBOutlet weak var myImageView: UIImageView!
  38. @IBOutlet weak var uploadButton: UIButton!
  39. @IBOutlet weak var imageUploadProgressView: UIProgressView!
  40. @IBOutlet weak var progressLabel: UILabel!
  41.  
  42. override func viewDidLoad() {
  43.  
  44. super.viewDidLoad()
  45.  
  46. }
  47.  
  48. @IBAction func uploadButtonTapped(_ sender: Any) {
  49. var myPickerController = UIImagePickerController()
  50. myPickerController.delegate = self
  51. myPickerController.sourceType = UIImagePickerControllerSourceType.photoLibrary
  52. self.present(myPickerController, animated: true, completion: nil)
  53. }
  54.  
  55.  
  56. public func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
  57. myImageView.image = info[UIImagePickerControllerOriginalImage] as? UIImage
  58. myImageView.backgroundColor = UIColor.clear
  59. self.dismiss(animated: true, completion: nil)
  60. uploadImage()
  61. }
  62.  
  63.  
  64. func uploadImage() {
  65. let imageData = UIImageJPEGRepresentation(myImageView.image!, 1)
  66.  
  67. if(imageData == nil) {
  68. return
  69. }
  70.  
  71. self.uploadButton.isEnabled = false
  72. let uploadScriptUrl = URL(string: "https://mywebserver/upload5/")
  73.  
  74. var request = URLRequest(url: uploadScriptUrl!)
  75. request.httpMethod = "POST"
  76. request.setValue("Keep-Alive", forHTTPHeaderField: "Connection")
  77. var configuration = URLSessionConfiguration.default
  78. var session = URLSession(configuration: configuration, delegate: self as! URLSessionDelegate, delegateQueue: OperationQueue.main)
  79. //var task = session.uploadTaskWithRequest(request as URLRequest, fromData: imageData!)
  80. //var task = session.uploadTask(with: request as URLRequest, fromFile: imageData)
  81. var task = session.uploadTask(with: request, from: imageData!)
  82. task.resume()
  83.  
  84. }
  85.  
  86. func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) {
  87.  
  88. let myAlert = UIAlertController(title: "Alert", message: error?.localizedDescription, preferredStyle: .alert)
  89. myAlert.addAction(UIAlertAction(title: "Yes", style: .default, handler: nil))
  90. self.present(myAlert, animated: true, completion: nil)
  91. self.uploadButton.isEnabled = true
  92. }
  93.  
  94. func urlSession(_ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) {
  95.  
  96. var uploadProgress:Float = Float(totalBytesSent) / Float(totalBytesExpectedToSend)
  97. imageUploadProgressView.progress = uploadProgress
  98. let progressPercent = Int(uploadProgress*100)
  99. progressLabel.text = "(progressPercent)%"
  100.  
  101. }
  102.  
  103.  
  104. func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) {
  105.  
  106. self.uploadButton.isEnabled = true
  107. print("Done")
  108.  
  109. }
  110.  
  111. <?
  112. $target_dir = "uploadDestination/";
  113. if(!file_exists($target_dir))
  114. {
  115. mkdir($target_dir, 0777, true);
  116. }
  117.  
  118. $target_dir = $target_dir . "/" . basename($_FILES["file"]["name"]);
  119.  
  120. if (move_uploaded_file($_FILES["file"]["tmp_name"], $target_dir)) {
  121. echo json_encode([
  122. "Message" => "The file ". basename( $_FILES["file"]["name"]). " has been uploaded.",
  123. "Status" => "OK"
  124. ]);
  125. } else {
  126. echo json_encode([
  127. "Message" => "Sorry, there was an error uploading your file.",
  128. "Status" => "Error"
  129. ]);
  130. }
  131.  
  132. ?>
  133.  
  134. Privacy - Photo Library Additions Usage Description
  135. Privacy - Camera Usage Description
Add Comment
Please, Sign In to add comment