图片上传hash 有bug,修复

This commit is contained in:
2025-12-03 18:05:40 +08:00
parent a97f015205
commit 87824c0021
6 changed files with 27 additions and 10 deletions

View File

@@ -56,12 +56,12 @@ const syncUpload = new Command('upload')
});
if (res.code === 200) {
if (res.data?.isNew) {
newInfos.push(['上传成功', item.key, chalk.green(item.url), chalk.green('文件上传')]);
newInfos.push(['上传成功', item.key, chalk.green(item.url), chalk.green('文件上传'), chalk.yellow(`hash: ${res.data.hash}`)]);
} else if (res.data?.isNewMeta) {
newInfos.push(['上传成功', item.key, chalk.green(item.url), chalk.green('元数据更新')]);
newInfos.push(['上传成功', item.key, chalk.green(item.url), chalk.green('元数据更新'), chalk.yellow(`hash: ${res.data.hash}`)]);
} else {
// 文件未更新
logger.info('上传成功', item.key, chalk.green(item.url), chalk.blue('文件未更新'));
logger.debug('上传成功', item.key, chalk.green(item.url), chalk.blue('文件未更新'), chalk.yellow(`hash: ${res.data.hash}`));
}
}
logger.debug(res);