-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Implement a “Download Report” feature that allows users to download report PDFs directly from the website without leaving the page. Ensure that every published report in Payload CMS includes a mandatory PDF upload.
As an admin,
I want to upload a report PDF when creating a new report,
So that users can download it directly from the site without any missing files.
As a website user,
I want to download reports directly from the site,
So that I can easily access the file without being redirected elsewhere.
Acceptance Criteria:
- CMS (Payload) Updates
- Add a new report_pdf field to the Reports collection.
- Field type: File Upload (PDF only).
- Upload PDF Validation = Required. (Make it a *required field).
- A report cannot be created/published without an uploaded report pdf file.
- Ensure uploaded files are stored in Payload’s media directory.
- Frontend Updates
- Display a Download Report button on each report page or card where applicable.
- On click, initiate a direct file download of the uploaded PDF (same-page action, no redirect).
- The downloaded filename should use the report title, not the name of the PDF.
- The download button triggers the opening of the pdf file in the browser, then the user can decide to download from there.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done