Add debug logs to download handler for production troubleshooting
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user