Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile Should Allow for Upload of Files #196

Open
11 tasks
gregv opened this issue Aug 17, 2024 · 0 comments
Open
11 tasks

Profile Should Allow for Upload of Files #196

gregv opened this issue Aug 17, 2024 · 0 comments
Assignees

Comments

@gregv
Copy link
Contributor

gregv commented Aug 17, 2024

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
@ishaankalbhor ishaankalbhor self-assigned this Sep 18, 2024
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

No branches or pull requests

2 participants