mirror of https://github.com/usememos/memos.git
- Add serveMediaStream() to stream video/audio without loading into memory - Use http.ServeFile for local files (zero-copy, handles range requests) - Redirect to S3 presigned URLs for S3-stored media files - Refactor for better maintainability: - Extract constants and pre-compile lookup maps - Consolidate duplicated S3 client creation logic - Split authentication into focused helper methods - Group code by responsibility with section comments - Add setSecurityHeaders() and setMediaHeaders() helpers |
||
|---|---|---|
| .. | ||
| auth | ||
| router | ||
| runner | ||
| server.go | ||