Description
Replace the manual profilePhotoUrl text field with actual file upload. Store photos in MongoDB using GridFS — no external storage service needed.
Acceptance Criteria
POST /api/upload accepts a single image (JPEG/PNG, max 2MB) via multer
- Image stored in MongoDB GridFS (
fs.files + fs.chunks collections)
GET /api/upload/:id streams the image back from GridFS for display
- Alumni model stores the GridFS file ID; profilePhotoUrl populated automatically
- Frontend profile edit page has a file picker with image preview
- Old photo deleted from GridFS when a new one is uploaded
Priority: P3 | Complexity: M | Dependencies: Profile create/edit issue
Description
Replace the manual profilePhotoUrl text field with actual file upload. Store photos in MongoDB using GridFS — no external storage service needed.
Acceptance Criteria
POST /api/uploadaccepts a single image (JPEG/PNG, max 2MB) via multerfs.files+fs.chunkscollections)GET /api/upload/:idstreams the image back from GridFS for displayPriority: P3 | Complexity: M | Dependencies: Profile create/edit issue