Show error toast when file size exceeds the limits (#27985)

As title.
Before that, there was no alert at all.
After:

![error_toast](https://github.com/go-gitea/gitea/assets/70063547/c54ffeed-76f8-4c3a-b5dc-b9b3e0f8fc76)
This commit is contained in:
Nanguan Lin 2023-11-10 19:43:18 +08:00 committed by GitHub
parent 481e738e7f
commit 6c9e196e54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -247,6 +247,10 @@ export function initGlobalDropzone() {
});
}
});
this.on('error', function (file, message) {
showErrorToast(message);
this.removeFile(file);
});
},
});
}