Skip to content

Commit 60b51d0

Browse files
GiteaBotlng2020
andauthored
Show error toast when file size exceeds the limits (#27985) (#27986)
Backport #27985 by @lng2020 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) Co-authored-by: Nanguan Lin <[email protected]>
1 parent 824d40e commit 60b51d0

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
@@ -248,6 +248,10 @@ export function initGlobalDropzone() {
248248
});
249249
}
250250
});
251+
this.on('error', function (file, message) {
252+
showErrorToast(message);
253+
this.removeFile(file);
254+
});
251255
},
252256
});
253257
}

0 commit comments

Comments
 (0)