Skip to content

Commit 6c9e196

Browse files
authored
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)
1 parent 481e738 commit 6c9e196

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

web_src/js/features/common-global.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,10 @@ export function initGlobalDropzone() {
247247
});
248248
}
249249
});
250+
this.on('error', function (file, message) {
251+
showErrorToast(message);
252+
this.removeFile(file);
253+
});
250254
},
251255
});
252256
}

0 commit comments

Comments
 (0)