docs: 更新需求文档至v0.5并归档开发进度;修复大文件上传与二维码海报

- 需求文档升级到 v0.5:补充二维码海报保存文件名默认格式、大文件上传三层限制(IIS+ASP.NET+前端)部署约束、新增第11章开发进度状态归档(已上线功能/已修复缺陷/已知限制/后续优化)
- 后端 FileController.Upload 增加 [RequestFormLimits(MultipartBodyLengthLimit=220_200_960)],修复>128MB multipart 上传被拒
- 前端 UploadView 二维码海报:修正 drawImage 缩放错位、顶部logo/标题垂直居中、分区标题间距、大小与有效期分行显示;保存文件名改为 文传易取件码-取件码(原文件名)-流水号.png
- 新增部署脚本:apply_backend.ps1 / force_dll.ps1(app_offline 解锁DLL)/ ftp_fe.ps1 / ftp_diag.ps1 / ftp_apply.ps1 / _diag/check_dll.ps1

(部署手册 IIS部署与FTP发布.md 仅含编码/BOM 差异,未纳入本次提交)
This commit is contained in:
2026-08-24 02:02:57 +08:00
parent 2e3f68472e
commit 5568548001
9 changed files with 389 additions and 28 deletions
+41
View File
@@ -0,0 +1,41 @@
# Upload frontend build (nested wwwroot) - overwrite index.html, upload new assets, delete old ones
$ErrorActionPreference = "Continue"
$FtpHost="116.198.221.125"; $FtpPort=21; $FtpUser="wenchuanyi"; $FtpPass="r7P^f*v7rFts"
$Dist = "D:\CodeBuddy\Pros\WenChuanyi\frontend\dist"
function NewR($p,$m,$to=90000){ $u="ftp://${FtpHost}:${FtpPort}/"+$p.TrimStart('/'); $r=[System.Net.FtpWebRequest]::Create($u); $r.Method=$m; $r.Credentials=New-Object System.Net.NetworkCredential($FtpUser,$FtpPass); $r.UsePassive=$true; $r.UseBinary=$true; $r.KeepAlive=$false; $r.Timeout=$to; $r }
function GetSizeF($p){
try{ $r=NewR $p ([System.Net.WebRequestMethods+Ftp]::GetFileSize) 30000; $resp=$r.GetResponse(); $s=$resp.ContentLength; $resp.Close(); return $s }
catch{ return -1 }
}
function DelF($p){
try{ $r=NewR $p ([System.Net.WebRequestMethods+Ftp]::DeleteFile); $resp=$r.GetResponse(); try{$resp.Close()}catch{}; Write-Host "DEL $p" }
catch{ Write-Host "DEL skip $p (not exist or locked)" }
Start-Sleep -Milliseconds 500
}
function UpF($lp,$rp){
$want=(Get-Item $lp).Length
DelF $rp
Start-Sleep -Seconds 1
for($i=1;$i -le 4;$i++){
try{
$r=NewR $rp ([System.Net.WebRequestMethods+Ftp]::UploadFile) 300000
$b=[IO.File]::ReadAllBytes($lp); $r.ContentLength=$b.Length
$s=$r.GetRequestStream(); try{ $s.Write($b,0,$b.Length) } finally { $s.Close() }
$resp=$r.GetResponse(); try{ $resp.Close() }catch{}
Start-Sleep -Milliseconds 500
$after=GetSizeF $rp
if($after -eq $want){ Write-Host "UP OK $rp ($after bytes)"; return $true }
Write-Host "SIZE MISMATCH $rp got=$after want=$want"
}catch{ Write-Host "RETRY($i) $rp : $($_.Exception.Message)" }
Start-Sleep -Seconds 3
}
Write-Host "FAIL $rp"; return $false
}
# upload new dist
$ok=$true
$ok=(UpF "$Dist\index.html" "/wwwroot/wwwroot/index.html") -and $ok
$ok=(UpF "$Dist\assets\index-DmgEpwV6.js" "/wwwroot/wwwroot/assets/index-DmgEpwV6.js") -and $ok
$ok=(UpF "$Dist\assets\index-BjMMI5BR.css" "/wwwroot/wwwroot/assets/index-BjMMI5BR.css") -and $ok
# remove stale old-hash assets
DelF "/wwwroot/wwwroot/assets/index-C2wmSVTP.js"
if($ok){ Write-Host "FE DEPLOY OK" } else { Write-Host "FE DEPLOY PARTIAL" }