Add error toast for 413 content too large response on image uploads (#1675)
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
This commit is contained in:
parent
0764b75dc2
commit
bca438b2c6
4 changed files with 10 additions and 0 deletions
|
@ -187,6 +187,8 @@ function handleImageUpload(i: PostForm, event: any) {
|
|||
imageLoading: false,
|
||||
imageDeleteUrl: res.data.delete_url as string,
|
||||
});
|
||||
} else if (res.data.msg === "too_large") {
|
||||
toast(I18NextService.i18n.t("upload_too_large"), "danger");
|
||||
} else {
|
||||
toast(JSON.stringify(res), "danger");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue