diff --git a/manifest.json b/manifest.json index 460ef78..7bd5616 100644 --- a/manifest.json +++ b/manifest.json @@ -4,12 +4,16 @@ "name": "LLOneBot", "slug": "LLOneBot", "description": "实现 OneBot 11 和 Satori 协议,用于 QQ 机器人开发", - "version": "4.1.2", + "version": "4.1.3", "icon": "./icon.webp", "authors": [ { "name": "linyuchen", "link": "https://github.com/linyuchen" + }, + { + "name": "idranme", + "link": "https://github.com/idranme" } ], "repository": { @@ -30,4 +34,4 @@ "main": "./main/main.cjs", "preload": "./preload/preload.cjs" } -} \ No newline at end of file +} diff --git a/src/common/utils/file.ts b/src/common/utils/file.ts index 6bb9c9a..5256ab6 100644 --- a/src/common/utils/file.ts +++ b/src/common/utils/file.ts @@ -122,8 +122,11 @@ export async function uri2local(ctx: Context, uri: string, needExt?: boolean): P const { type } = checkUriType(uri) if (type === FileUriType.FileURL) { - const filePath = fileURLToPath(uri) + const fileUri = uri.replace('%', '%25').replace('#', '%23') + const filePath = fileURLToPath(fileUri) const fileName = path.basename(filePath) + // console.log('fileURLToPath', filePath) + // console.log('fileName', fileName) return { success: true, errMsg: '', fileName, path: filePath, isLocal: true } } diff --git a/src/onebot11/action/go-cqhttp/DownloadFile.ts b/src/onebot11/action/go-cqhttp/DownloadFile.ts index d94a866..c157dfd 100644 --- a/src/onebot11/action/go-cqhttp/DownloadFile.ts +++ b/src/onebot11/action/go-cqhttp/DownloadFile.ts @@ -23,8 +23,8 @@ interface FileResponse { export class DownloadFile extends BaseAction { actionName = ActionName.GoCQHTTP_DownloadFile payloadSchema = Schema.object({ - url: String, - base64: String, + url: Schema.string(), + base64: Schema.string(), headers: Schema.union([String, Schema.array(String)]) }) diff --git a/src/version.ts b/src/version.ts index 6b0bbf5..942a331 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '4.1.2' +export const version = '4.1.3'