Skip to content

Profile Photo Upload via MongoDB GridFS #8

@jask1m

Description

@jask1m

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

Metadata

Metadata

Assignees

No one assigned

    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