Skip to content

feat: add image message support with MinIO storage#11

Open
coderloganli wants to merge 2 commits intomasterfrom
feat/image-message
Open

feat: add image message support with MinIO storage#11
coderloganli wants to merge 2 commits intomasterfrom
feat/image-message

Conversation

@coderloganli
Copy link
Owner

Summary

  • Add image upload and delivery capability for single chat and room chat using MinIO object storage
  • Support JPEG, PNG, GIF, and WebP formats up to 10MB with automatic bucket creation
  • Add ContentType field to message protocol for distinguishing text and image messages
  • Fix WebSocket port mismatch bug that prevented real-time message display

Changes

  • docker-compose.yml: Add MinIO service with ports 9000/9001
  • api/handler/upload.go: New image upload handler with validation
  • config/: Add MinIO configuration across all environments
  • proto/logic.go: Add ContentType field to message structs
  • logic/rpc.go: Update Push/PushRoom to save and return ContentType
  • tests/: Add integration tests and functional test script

Test plan

  • Run docker compose up to start all services including MinIO
  • Run scripts/feat-image-message.sh to verify image upload and messaging
  • Run go test -v ./tests/integration/image_message_test.go for integration tests
  • Verify image messages appear in chat history with correct contentType

🤖 Generated with Claude Code

coderloganli and others added 2 commits January 26, 2026 10:19
- Migrate from SQLite to PostgreSQL for database storage
- Add message persistence for single chat and room messages
- Add history API endpoints for retrieving chat history
- Add integration tests for message history
- Add functional test script for the feature

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add image upload and delivery capability for single chat and room chat:
- Add MinIO service to docker-compose for object storage
- Create upload handler with file validation (JPEG/PNG/GIF/WebP, max 10MB)
- Add ContentType field to message protocol and database schema
- Update Push/PushRoom APIs to support image content type
- Add integration tests and functional test script

Also includes fix for WebSocket port mismatch bug that prevented
real-time message display.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant