- 新增阿里云OSS SDK核心类库文件 - 新增OSS插件配置文件及钩子监听 - 新增分类图标SVG资源并优化为轻量化格式 - 替换定位接口为天地图逆地理编码接口 - 新增OSS图片缩略处理工具方法
32 行
1018 B
PowerShell
32 行
1018 B
PowerShell
# 抽查 3 个文件 md5
|
|
$sampleIds = @('9.jpg', '200.jpg', '407.jpg')
|
|
$downloaded = 'D:\Softwares\phpstudy_pro\WWW\fenleixinxi\tmp_img\downloaded'
|
|
|
|
Write-Host "=== MD5 抽查 ==="
|
|
$hashes = @()
|
|
foreach ($f in $sampleIds) {
|
|
$fullPath = Join-Path $downloaded $f
|
|
if (Test-Path $fullPath) {
|
|
$size = (Get-Item $fullPath).Length
|
|
$hash = (Get-FileHash $fullPath -Algorithm MD5).Hash
|
|
Write-Host "$f | size=$size | md5=$hash"
|
|
$hashes += $hash
|
|
} else {
|
|
Write-Host "$f | MISSING!"
|
|
}
|
|
}
|
|
|
|
Write-Host ""
|
|
$uniqueHashes = $hashes | Select-Object -Unique
|
|
Write-Host "Unique MD5 count: $($uniqueHashes.Count) / $($hashes.Count)"
|
|
if ($uniqueHashes.Count -eq $hashes.Count) {
|
|
Write-Host "PASS: All 3 sampled files have different MD5 hashes."
|
|
} else {
|
|
Write-Host "FAIL: Some MD5 hashes are identical!"
|
|
}
|
|
|
|
# Also check total count of jpg files
|
|
$allJpg = (Get-ChildItem $downloaded -Filter *.jpg -File).Count
|
|
Write-Host ""
|
|
Write-Host "Total .jpg files in downloaded/: $allJpg"
|