From dab2313320d512614ce01a5b32a8e689c7cd227f Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 1 Mar 2024 17:05:02 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E9=99=90=E5=88=B6=20?= =?UTF-8?q?rz=20=E6=96=87=E4=BB=B6=E4=B8=8B=E8=BD=BD=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/components/Terminal.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/src/components/Terminal.vue b/ui/src/components/Terminal.vue index 13838187a..6995714e0 100644 --- a/ui/src/components/Terminal.vue +++ b/ui/src/components/Terminal.vue @@ -553,6 +553,13 @@ export default { zsession.on('offer', xfer => { const buffer = []; const detail = xfer.get_details(); + if (detail.size >= MAX_TRANSFER_SIZE) { + const msg = this.$t("Terminal.ExceedTransferSize") + ": " + bytesHuman(MAX_TRANSFER_SIZE) + this.$log.debug(msg) + this.$message(msg) + xfer.skip(); + return + } xfer.on('input', payload => { this.updateReceiveProgress(xfer); buffer.push(new Uint8Array(payload));