mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
Merge branch 'dev'
This commit is contained in:
commit
edf7a97269
@ -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": {
|
||||
|
@ -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 }
|
||||
}
|
||||
|
||||
|
@ -23,8 +23,8 @@ interface FileResponse {
|
||||
export class DownloadFile extends BaseAction<Payload, FileResponse> {
|
||||
actionName = ActionName.GoCQHTTP_DownloadFile
|
||||
payloadSchema = Schema.object({
|
||||
url: String,
|
||||
base64: String,
|
||||
url: Schema.string(),
|
||||
base64: Schema.string(),
|
||||
headers: Schema.union([String, Schema.array(String)])
|
||||
})
|
||||
|
||||
|
@ -1 +1 @@
|
||||
export const version = '4.1.2'
|
||||
export const version = '4.1.3'
|
||||
|
Loading…
x
Reference in New Issue
Block a user