Skip to content

Add staged upload review workflow for Google Drive photos - #21

Merged
wailbentafat merged 2 commits into
mainfrom
feat/staged-upload-review
Mar 19, 2026
Merged

Add staged upload review workflow for Google Drive photos#21
wailbentafat merged 2 commits into
mainfrom
feat/staged-upload-review

Conversation

@ademboukabes

Copy link
Copy Markdown
Collaborator

Summary

This PR adds the staged upload review workflow for staff Google Drive photos.

Staff can now submit upload requests from Google Drive, store the images in MinIO staging, and let a multi_team_lead preview the photos before approving or rejecting the request.

What was added

  • download selected photos from Google Drive on upload request creation
  • validate downloaded image format and size server-side
  • store staged images in MinIO before approval
  • persist staged photo metadata in upload_request_photos
  • allow request detail and staged photo listing
  • allow photo preview before approval/rejection
  • promote approved photos from MinIO staging to final storage
  • create final photos rows on approval
  • reject requests with staged storage cleanup
  • publish upload request lifecycle events through NATS/JetStream

Technical changes

  • added StagedUploadStorageService
  • extended GoogleDriveClient with file metadata and file download support
  • extended MinIO storage helpers with byte upload and server-side copy support
  • refactored UploadRequestsService to orchestrate:
    • Drive download
    • staging storage
    • approval promotion
    • rejection cleanup
  • mounted staff upload routes in the staff router
  • enriched upload_request_photos schema with:
    • file_name
    • mime_type
    • size_bytes
    • status
    • final_storage_key
  • added SQL queries and generated accessors for staged upload photos
  • added migration for the staff upload review base schema

Endpoints

  • POST /stuff/uploads/request
  • GET /stuff/uploads
  • GET /stuff/uploads/{request_id}
  • GET /stuff/uploads/{request_id}/photos
  • GET /stuff/uploads/{request_id}/photos/{photo_id}/preview
  • POST /stuff/uploads/{request_id}/approve
  • POST /stuff/uploads/{request_id}/reject

Known limitation

Full local API startup is currently blocked by an existing Ai runtime dependency issue

@wailbentafat
wailbentafat merged commit a850ca5 into main Mar 19, 2026
1 check passed
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.

2 participants