图片上传hash 有bug,修复
This commit is contained in:
BIN
test/Snipaste_2025-12-03_16-53-48.png
Normal file
BIN
test/Snipaste_2025-12-03_16-53-48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 169 KiB |
14
test/hash-fix.ts
Normal file
14
test/hash-fix.ts
Normal 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);
|
||||
Reference in New Issue
Block a user