• Johnny's avatar
    fix(fileserver): use streaming for video/audio to prevent memory exhaustion · 86fab0cf
    Johnny authored
    - 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
    86fab0cf
Name
Last commit
Last update
..
auth Loading commit data...
router Loading commit data...
runner Loading commit data...
server.go Loading commit data...