Example #1
0
        private async void LoadFileBtn_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                string filePath = openFileDialog1.FileName;
                if (httpClient.CheckFileRestrictions(filePath))
                {
                    int fileId = await httpClient.LoadFile(filePath);

                    httpClient.LoadedFiles.Add(fileId, Path.GetFileName(filePath));
                    LoadedFIlesCBox.Text          = "";
                    LoadedFIlesCBox.SelectedIndex = -1;
                    UpdateFilesList();
                }
                else
                {
                    MessageBox.Show("Файл не подходит по формату или размер файла не более 50МБ/суммарный размер файлов не более 100МБ ");
                }
            }
        }