mirror of
https://github.com/jumpserver/lina.git
synced 2026-05-16 20:36:41 +00:00
feat: add 413 upload file too large global flash message
This commit is contained in:
@@ -103,7 +103,11 @@ export function logout() {
|
||||
export function flashErrorMsg({ response, error }) {
|
||||
if (!response.config.disableFlashErrorMsg) {
|
||||
const responseErrorMsg = getErrorResponseMsg(error)
|
||||
const msg = responseErrorMsg || error.message
|
||||
let msg = responseErrorMsg || error.message
|
||||
|
||||
if (response.status === 413) {
|
||||
msg = i18n.t('UploadFileTooLarge')
|
||||
}
|
||||
|
||||
if (response.status === 403 && msg === 'CSRF Failed: CSRF token missing.') {
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user