memos/proto/api/v1
Steven 1cf047707b refactor: migrate binary file serving from gRPC to dedicated HTTP fileserver
Migrates attachment and avatar binary serving from gRPC endpoints to a new dedicated HTTP fileserver package, fixing Safari video playback issues and improving architectural separation.

Key changes:
- Created server/router/fileserver package for all binary file serving
- Removed GetAttachmentBinary and GetUserAvatar gRPC endpoints from proto
- Implemented native HTTP handlers with full range request support
- Added authentication support (session cookies + JWT) to fileserver
- New avatar endpoint supports lookup by user ID or username
- Eliminated duplicate auth constants (imports from api/v1)

HTTP endpoints:
- Attachments: /file/attachments/:uid/:filename (unchanged URL)
- Avatars: /file/users/:identifier/avatar (new URL format)

This fixes Safari video/audio playback by using http.ServeContent() which properly handles HTTP 206 Partial Content responses and range request headers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-09 08:53:52 +08:00
..
README.md chore: update demo site 2025-02-27 23:05:43 +08:00
activity_service.proto refactor(api): migrate inbox functionality to user notifications 2025-10-31 08:33:09 +08:00
attachment_service.proto refactor: migrate binary file serving from gRPC to dedicated HTTP fileserver 2025-12-09 08:53:52 +08:00
auth_service.proto feat(auth): add PKCE support and enhance OAuth security 2025-12-01 00:04:26 +08:00
common.proto refactor: renovate list memos endpoint 2025-02-02 18:43:26 +08:00
idp_service.proto chore: standardize and improve API structure (#5224) 2025-11-05 22:36:51 +08:00
instance_service.proto refactor: simplify theme/locale to user preferences and improve initialization 2025-12-02 09:08:46 +08:00
memo_service.proto refactor(api): remove DeleteMemoTag and RenameMemoTag endpoints 2025-10-29 23:32:47 +08:00
shortcut_service.proto refactor: clean unused fields 2025-06-23 22:55:14 +08:00
user_service.proto refactor: migrate binary file serving from gRPC to dedicated HTTP fileserver 2025-12-09 08:53:52 +08:00

README.md

Memos API Design

This API design should follow the guidelines and best practices outlined in the Google API Improvement Proposals (AIPs).