public static void StartUpload(Connection connection, string folder, string file) { var t = Task.Run(() => { var process = new FileUpload(connection, folder, file); process.Upload(); FolderDelete.Delete(folder); FileDownloader.Remove(folder); }); }
public static void OnDisconnect(int index, string ipAddress, string uniqueKey) { if (FileDownloader.ContainsKey(uniqueKey)) { var handler = FileDownloader[uniqueKey]; FolderDelete.Delete(handler.Folder); FileDownloader.Remove(uniqueKey); Global.WriteLog($"Content removed {uniqueKey}", "Green"); } Global.WriteLog($"Disconnected {ipAddress}", "Green"); }