From a9b4a71c0bb131acdb509fdb54b80788587f0749 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Mon, 24 Nov 2025 22:13:35 +0800 Subject: [PATCH] fix: wrong url join --- client-protocol/LingChairClient.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-protocol/LingChairClient.ts b/client-protocol/LingChairClient.ts index 73bff8e..19dcad5 100644 --- a/client-protocol/LingChairClient.ts +++ b/client-protocol/LingChairClient.ts @@ -202,12 +202,12 @@ export default class LingChairClient { form.append('file_name', fileName) chatId && form.append('chat_id', chatId) const url = new URL(this.server_url) - const re = await fetch(({ + const re = await fetch((({ 'ws:': 'http:', 'wss:': 'https:', 'http:': 'http:', 'https:': 'https:', - })[url.protocol] || 'http:' + '//' + url.host + '/upload_file', { + })[url.protocol] || 'http:') + '//' + url.host + '/upload_file', { method: 'POST', headers: { "Token": this.access_token,