Skip to content

Commit

Permalink
Show error toast when file size exceeds the limits (#27985)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
lng2020 committed Nov 10, 2023
1 parent 481e738 commit 6c9e196
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web_src/js/features/common-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ export function initGlobalDropzone() {
});
}
});
this.on('error', function (file, message) {
showErrorToast(message);
this.removeFile(file);
});
},
});
}
Expand Down

0 comments on commit 6c9e196

Please sign in to comment.