Skip to content

Add download feature #65

@Hemavathi15sg

Description

@Hemavathi15sg

Implement a download feature that allows users to download resources or data as needed within the CourseApplication platform. This could include course materials, generated reports, or any files relevant to user activity. The new feature should integrate seamlessly with the current application structure and UI.

Acceptance Criteria:

  • Users can trigger downloads from relevant sections.
  • The implementation supports common file types (e.g., PDF, DOCX, CSV).
  • Proper error handling is in place for failed downloads.
  • Access permissions for downloads are respected based on user role.

Potential Enhancements:

  • Download progress indicators for large files.
  • Bulk/multi-file download capability.

Implementation notes and code pointers:

  • The main front-end logic is located in frontend/script.js. This file handles navigation, UI updates, and contains candidate spots for adding UI controls and logic for download actions. For example, you can define new functions similar to refreshCourses, showCourseDetails, or utilize event handlers for modals to integrate download triggers (see script.js).
  • For managing download UI (modals/buttons), also reference the modal-related styles in frontend/styles.css for consistent UI updates (see styles.css).
  • To support backend file retrieval, consider creating an appropriate API endpoint in the .NET backend (possibly in Controllers/HomeController.cs) to serve downloadable files with access control (see HomeController.cs).
  • Ensure error handling in downloads leverages the front-end's error modal functionality (see showErrorModal in script.js) and server-side HTTP error responses.

Please consider best practices for file security during the download process.

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions