Skip to content

Conversation

@naman0r
Copy link

@naman0r naman0r commented Nov 23, 2025

ℹ️ Issue

Closes #210

📝 Description

Full file upload flow for applicants

Briefly list the changes made to the code:

1. File Download Endpoint Added

File: apps/backend/src/file-upload/file-upload.service.ts

  • Added getFileById(fileId: number) method
  • Returns complete file with data and relations (application, user)
  • Throws NotFoundException if file doesn't exist

2. File: apps/backend/src/file-upload/file-upload.controller.ts

  • Added GET /api/file-upload/download/:fileId endpoint
  • Uses StreamableFile for efficient file downloads
  • Sets proper HTTP headers:
    • Content-Type: File's mimetype
    • Content-Disposition: Attachment with filename
    • Content-Length: File size
  • Returns file as downloadable blob

3. Download File Method Added (frontend_

File: apps/frontend/src/api/apiClient.ts

  • Added downloadFile(accessToken: string, fileId: number): Promise<Blob> method
  • Configured axios to handle responseType: 'blob'
  • Properly passes authorization token in headers
  • Returns blob for browser download

4: Reusable FileWidget Component

5. Integrated FileWidget into Application Detail View

File: apps/frontend/src/features/applications/components/ApplicationTables/individualApplication.tsx

6. UI Integration:

  • Added Grid container with FileWidget components
  • Resume widget: Always visible (Grid xs={12} md={6} or md={12})
  • PM Challenge widget: Conditionally rendered only if isPM === true
  • Positioned after form controls, before Application Response section
  • Uses onFileUploaded callback to refresh file list after upload

FORM LINK:
https://docs.google.com/forms/d/e/1FAIpQLScGimGWc9CGy9gGsGOVzPCyM3hapgg94IPU2LA6qSk0SR3F2Q/viewform?usp=sharing&ouid=114299777948262504771 (click edit form button on bottom right)

image (there is a weird overlapping issue which we will fix)

@Tarun-Nagesh Tarun-Nagesh changed the title progress Added components for PM apps Nov 23, 2025
Copy link

@Ryaken-Nakamoto Ryaken-Nakamoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W PR, ggs

@Ryaken-Nakamoto Ryaken-Nakamoto merged commit 5448ba1 into main Dec 2, 2025
5 of 6 checks passed
@Ryaken-Nakamoto Ryaken-Nakamoto deleted the ticket/210 branch December 2, 2025 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Resume and PM Challenge File Uploads

4 participants