- 需求文档升级到 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 差异,未纳入本次提交)
25 lines
1.7 KiB
PowerShell
25 lines
1.7 KiB
PowerShell
# Download remote DLL + search for the new attribute metadata string
|
|
$ErrorActionPreference = "Continue"
|
|
$h="116.198.221.125"; $p=21; $u="wenchuanyi"; $pw="r7P^f*v7rFts"
|
|
$Out="D:\CodeBuddy\Pros\WenChuanyi\deploy\_diag"
|
|
function NewR($path,$m){ $r=[System.Net.FtpWebRequest]::Create("ftp://${h}:${p}/"+$path.TrimStart('/')); $r.Method=$m; $r.Credentials=New-Object System.Net.NetworkCredential($u,$pw); $r.UsePassive=$true; $r.UseBinary=$true; $r.KeepAlive=$false; $r.Timeout=60000; return $r }
|
|
# download remote dll
|
|
try{
|
|
$r=NewR "/wwwroot/WenChuanyi.Api.dll" ([System.Net.WebRequestMethods+Ftp]::DownloadFile)
|
|
$resp=$r.GetResponse(); $fs=[IO.File]::Create("$Out\server-WenChuanyi.Api.dll")
|
|
$s=$resp.GetResponseStream(); $b=New-Object byte[] 65536
|
|
while(($n=$s.Read($b,0,65536)) -gt 0){ $fs.Write($b,0,$n) }
|
|
$fs.Close(); $s.Close(); $resp.Close()
|
|
$remote=Get-Item "$Out\server-WenChuanyi.Api.dll"
|
|
$local=Get-Item "D:\CodeBuddy\Pros\WenChuanyi\backend\WenChuanyi.Api\bin\Release\net8.0\publish\WenChuanyi.Api.dll"
|
|
Write-Host "remote dll len=$($remote.Length) mtime=$($remote.LastWriteTime)"
|
|
Write-Host "local dll len=$($local.Length) mtime=$($local.LastWriteTime)"
|
|
$bytes=[IO.File]::ReadAllBytes($remote.FullName)
|
|
$ascii=[Text.Encoding]::ASCII.GetString($bytes)
|
|
Write-Host "remote has 'RequestFormLimits': $($ascii.Contains('RequestFormLimitsAttribute'))"
|
|
$lb=[IO.File]::ReadAllBytes($local.FullName)
|
|
$lascii=[Text.Encoding]::ASCII.GetString($lb)
|
|
Write-Host "local has 'RequestFormLimits': $($lascii.Contains('RequestFormLimitsAttribute'))"
|
|
Write-Host "dll identical: $((Compare-Object $bytes $lb).Count -eq 0)"
|
|
}catch{ Write-Host "ERR $($_.Exception.Message)" }
|