Commit 46f3bb5c authored by nanahira's avatar nanahira

fix file download

parent 9d56016d
Pipeline #17702 failed with stages
in 44 seconds
{
"name": "koishi-plugin-pics",
"description": "Koishi 的随机图片插件",
"version": "10.3.0",
"version": "10.3.1",
"main": "dist/index.js",
"types": "dist/src/index.d.ts",
"scripts": {
......
......@@ -186,10 +186,8 @@ export default class PicsContainer
if (url.startsWith('base64://')) {
return Buffer.from(url.slice(9), 'base64');
}
return this._http.get<Buffer>(url, {
responseType: 'arraybuffer',
...extraConfig,
});
const { data } this._http.file(url);
return data;
}
bufferToUrl(buffer: Buffer) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment