public void Upload(string path, Stream stream, CancellableProgress progress, Action <string> success, Action <Exception> failure) { try { Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary.Add("Content-Type", "application/octet-stream"); WebManager.Put("https://transfer.sh/" + path, null, dictionary, stream, progress, delegate(byte[] result) { string obj2 = Encoding.UTF8.GetString(result, 0, result.Length).Trim(); success(obj2); }, delegate(Exception error) { failure(error); }); } catch (Exception obj) { failure(obj); } }