mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: download file add referer
This commit is contained in:
parent
ce6886011f
commit
92d780cf70
@ -4,7 +4,7 @@
|
||||
"name": "LLOneBot",
|
||||
"slug": "LLOneBot",
|
||||
"description": "实现 OneBot 11 协议,用于 QQ 机器人开发",
|
||||
"version": "3.32.1",
|
||||
"version": "3.32.2",
|
||||
"icon": "./icon.webp",
|
||||
"authors": [
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
"scripts": {
|
||||
"build": "electron-vite build",
|
||||
"build-mac": "npm run build && npm run deploy-mac",
|
||||
"deploy-mac": "cp -r dist/* ~/Library/Containers/com.tencent.qq/Data/LiteLoaderQQNT/plugins/LLOneBot/",
|
||||
"deploy-mac": "cp -r dist/* ~/Library/Containers/com.tencent.qq/Data/Documents/LiteLoaderQQNT/plugins/LLOneBot/",
|
||||
"build-win": "npm run build && npm run deploy-win",
|
||||
"deploy-win": "cmd /c \"xcopy /C /S /Y dist\\* %USERPROFILE%\\documents\\LiteLoaderQQNT\\plugins\\LLOneBot\\\"",
|
||||
"format": "prettier -cw .",
|
||||
|
@ -133,7 +133,7 @@ export async function uri2local(uri: string, filename?: string, needExt?: boolea
|
||||
|
||||
if (type === FileUriType.RemoteURL) {
|
||||
try {
|
||||
const res = await fetchFile(uri)
|
||||
const res = await fetchFile(uri, {'Referer': uri})
|
||||
const match = res.url.match(/.+\/([^/?]*)(?=\?)?/)
|
||||
if (match?.[1]) {
|
||||
filename ??= match[1].replace(/[/\\:*?"<>|]/g, '_')
|
||||
|
@ -1 +1 @@
|
||||
export const version = '3.32.1'
|
||||
export const version = '3.32.2'
|
||||
|
Loading…
x
Reference in New Issue
Block a user