private IEnumerator DoPost(string data, bool openLink, bool copyLink) { uploadError = false; data = "Initialize engine version: Log Viewer Hotkey\n" + data; byte[] encodedData = System.Text.Encoding.UTF8.GetBytes(data); int dataLength = encodedData.Length; bool tooLong = false; foreach (LogService service in services) { uploadError = false; string baseURL = service.BaseURL; int uploadLimit = service.UploadLimit; tooLong = false; if (dataLength >= uploadLimit) { Debug.LogFormat("[LogfileHotkey] Data ({0}B) is too long for {1} ({2}B)", dataLength, baseURL, uploadLimit); tooLong = true; continue; } Debug.LogFormat("[LogfileHotkey] Attempting to post log to {0}", baseURL); Notifier.Notify("Uploading Log", "Attempting to upload log to \"" + baseURL + "\"..."); yield return(StartCoroutine(service.Upload(encodedData, openLink, copyLink, data))); if (uploadError) { //Debug.Log("[LogfileHotkey] Error uploading log file: upload error."); //Notifier.Error("Error Uploading Log", "An unexpected error occurred."); continue; } else { break; } } if (tooLong) { Debug.Log("[LogfileHotkey] Error uploading log file: too long."); Notifier.Error("Error Uploading Log", "Log file was too long to upload."); } }