絕對路徑 `D:/.../file.rar` 可下載,但需相對路徑以適應部署環境。
// 直接使用相對路徑,瀏覽器自動解析為當前頁面基準 URL
window.location.href = "../usermanual/HCMAS DEMO使用說明書.rar";
window.location.href = "../usermanual/" + encodeURIComponent("HCMAS DEMO使用說明書.rar");
Content-Disposition: attachment; filename="..."