图片上传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

14
test/hash-fix.ts Normal file
View File

@@ -0,0 +1,14 @@
import { getHash } from '../src/uitls/hash.ts';
const minioHash = '380655ee50227439956c3a468cb6956a';
const myHash = 'e0d3293395d9459b295a56b03e5720fc'
import fs from 'node:fs'
import path from 'node:path'
const filePath = path.resolve('./test/Snipaste_2025-12-03_16-53-48.png')
const hash = getHash(filePath);
console.log('计算的hash:', hash);
console.log('minio的hash:', minioHash);
console.log('我的hash:', myHash);