[frontend/components] Catch and display a notice for IOException in compose
This commit is contained in:
parent
dcc6fd3a19
commit
d84979bd10
1 changed files with 9 additions and 2 deletions
|
@ -472,8 +472,15 @@
|
|||
private async Task Upload(InputFileChangeEventArgs e)
|
||||
{
|
||||
UploadingFiles += 1;
|
||||
try
|
||||
{
|
||||
var res = await ApiService.Drive.UploadFileAsync(e.File);
|
||||
Attachments.Add(res);
|
||||
}
|
||||
catch (IOException exception)
|
||||
{
|
||||
await GlobalComponentSvc.NoticeDialog?.Display(exception.Message, NoticeDialog.NoticeType.Error)!;
|
||||
}
|
||||
UploadingFiles -= 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue