private async void SendThread(string path, string eventId, DataType d) { IServerCommunicator com = new ServerCommunicator(); var ps = new PhotoToServer { Bytes = File.ReadAllBytes(path), Pin = eventId }; var cookies = await _memoryManager.GetCookies($"{currentGuest.Username}"); com.AddCookies(cookies); var success = await com.SendDataReturnIsValid(ps, DataType.Picture); NotifyDone?.Invoke(new MediaEventArgs { SendSucceeded = success }); }