晚点再修番茄解析

This commit is contained in:
Jerry 2025-05-16 12:41:03 +08:00
parent 4abe36912d
commit 4aa991153a

View File

@ -2,11 +2,7 @@ import fs from 'node:fs';
import path from 'path'; import path from 'path';
import chokidar from 'chokidar'; import chokidar from 'chokidar';
import ConfigControl from '../lib/config/configControl.js'; import ConfigControl from '../lib/config/configControl.js';
import configControl from '../lib/config/configControl.js';
import Fanqie from '../models/apps/fanqie/fanqie.js'; import Fanqie from '../models/apps/fanqie/fanqie.js';
import axios from 'axios';
import FormData from 'form-data';
import { finished } from 'stream/promises';
let redis = global.redis; let redis = global.redis;
@ -225,7 +221,7 @@ export class xzq extends plugin {
}); });
} }
return !!res; return !!res;
*/ //另外一种解决方法
const form = new FormData(); const form = new FormData();
if (!fs.existsSync(filePath)) { if (!fs.existsSync(filePath)) {
logger.error(`文件不存在:${filePath}`); logger.error(`文件不存在:${filePath}`);
@ -249,7 +245,8 @@ export class xzq extends plugin {
const url = response.data?.url; const url = response.data?.url;
const message = response.data?.message; const message = response.data?.message;
return { url, message }; return { url, message };
} }*/
return null;
} catch (err) { } catch (err) {
logger.error(`文件上传错误:${logger.red(err.stack)}`); logger.error(`文件上传错误:${logger.red(err.stack)}`);
e.reply(`文件上传失败:${err.message}`, true); e.reply(`文件上传失败:${err.message}`, true);