Add debug logs to download handler for production troubleshooting

This commit is contained in:
Warren
2026-09-21 14:06:33 +08:00
parent 864379af40
commit cb9810490a
21 changed files with 5430 additions and 0 deletions
@@ -185,10 +185,13 @@ pub async fn get_download_stats(State(state): State<AppState>) -> impl IntoRespo
pub async fn download_product_file(
Path((product_series, file_path)): Path<(String, String)>,
) -> impl IntoResponse {
log::info!("download_product_file called: product_series={}, file_path={}", product_series, file_path);
let base_path = format!("/Users/accusys/markbase/data/downloads/{}/", product_series);
let full_path = std::path::Path::new(&base_path).join(&file_path);
log::info!("Full path: {:?}", full_path);
if !full_path.exists() {
log::warn!("File not found: {:?}", full_path);
return (StatusCode::NOT_FOUND, "File not found").into_response();
}