Skip to content

Add certificate download functionality to Certificate page #60

@Hemavathi15sg

Description

@Hemavathi15sg

Currently, the Certificate page allows users to view the certificate ID, but there is no feature to download a digital version of the certificate. For a comprehensive user experience and to support verification or sharing, it is important to allow users to download their certificates.

Proposed enhancement:

  • Implement a 'Download PDF' button on the Certificate page.
  • When clicked, the button should initiate a request to a backend endpoint (e.g., /api/certificates/:certificateId/download).
  • The API should return a PDF (or specified file type) of the certificate for the given certificate ID.
  • Initiate a file download on successfully receiving the file from the backend. Show appropriate messaging on errors.
  • Ensure that the certificateId is validated/encoded and error handling is present on the frontend.
  • (Optional) Style the button and error states for better user experience.

Benefits:

  • Improves usability by letting users securely retain or send proof of course completion.
  • Standardizes certificate management for end users.

Acceptance criteria:

  • Button visible when certificate ID is present.
  • Download is successful for valid IDs and appropriate error is shown if the download fails.
  • UI reflects loading and error states.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions