Skip to content

Commit 97de033

Browse files
committed
fix: resolve 404 error for CSV file downloads from export directories
The download links in the exports page template were not correctly handling files located in timestamped export directories (export_YYYY-MM-DD_HH-MM). This caused 404 errors when users tried to download CSV files. Fixed by updating the template to construct proper download URLs: - For directory exports: /download/export_2025-07-11_15-43/ratings.csv - For individual files: /download/ratings.csv The fix uses template logic to check if the export ID starts with 'dir_' and builds the appropriate URL path accordingly.
1 parent 98788d1 commit 97de033

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/templates/exports.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ <h4>
213213
{{if eq .Status "completed"}}
214214
{{range .Files}}
215215
<a
216-
href="/download/{{.}}"
216+
href="{{if contains $.ID "dir_"}}/download/{{substr $.ID 4}}/{{.}}{{else}}/download/{{.}}{{end}}"
217217
class="btn btn-sm btn-secondary download-btn"
218218
title="Download {{.}}"
219219
>

0 commit comments

Comments
 (0)