Skip to content

Profile Should Allow for Upload of Files #196

@gregv

Description

@gregv

Add Resume and Receipt Upload to Profile Page

Overview

Update the profile page to allow users to upload their PDF resume and receipts for hackathon reimbursement, utilizing our existing Google Cloud Storage infrastructure.

Requirements

  • Add file upload fields for resume (PDF only) and receipts (PDF/JPG/PNG)
  • Implement client-side file validation
  • Update backend API to handle file uploads
  • Store uploaded files in existing Google Cloud Storage bucket
  • Display uploaded file names and allow deletion

Frontend Tasks

  • Add file input fields to Profile.js component
  • Implement handleFileUpload function using FormData
  • Add file type/size validation
  • Display uploaded file names
  • Add delete functionality for uploaded files
  • Update profile form submission to include file data

UI Mockup

  • Users can upload 1 resume PDF and multiple receipt files
  • Uploaded files are stored securely in GCS and linked to user profile
  • Users can view and delete uploaded files
  • Invalid file types/sizes are rejected with error message
  • Files are stored in appropriate GCS folders based on user ID and file type by calling backend

Backend Tasks

  • Update view/service files to handle multipart form data
  • Implement file upload logic (validate, sanitize filenames, etc)
  • Use Google Cloud Storage client library to store files in existing bucket
  • Update profile model to store file metadata and GCS object names
  • Implement file deletion API endpoint that removes file from GCS

Backend API Changes

POST /api/profile

  • Accept multipart/form-data
  • New fields: resume, receipts[]

DELETE /api/profile/files/{fileId}

  • Delete specific uploaded file from GCS and database

Google Cloud Storage Integration

  • Use existing GCS bucket: ohack-user-uploads (or specify actual bucket name)
  • Store files in user-specific folders: {user_id}/resume/ and {user_id}/receipts/
  • Generate signed URLs for secure file access

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions