Repository navigation
Date CSV export filenames - #32
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae8c7abad0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| <h1>Imports and exports</h1> | ||
| <section class="actions"> | ||
| <a class="button primary" href="/csv/export" data-file-export data-export-filename="driving-log.csv">Download CSV backup</a> | ||
| <a class="button primary" href="/csv/export" data-file-export data-export-filename="{{ csv_export_filename }}">Download CSV backup</a> |
There was a problem hiding this comment.
Derive the share filename when the export is requested
When /imports remains open across midnight in America/New_York, this attribute retains the previous day's filename. The mobile export handler captures that render-time value in app.js and uses it to construct the shared File, ignoring the fresh Content-Disposition returned by /csv/export, so an export made after midnight is still named with yesterday's date. Derive the filename from the export response or otherwise refresh it when the user requests the export.
Useful? React with 👍 / 👎.
ae8c7ab to
b6d7667
Compare
Include the current America/New_York date in the HTTP and mobile-share CSV filename, with web and WebKit coverage.