- Add dynamic URL generation based on S3_PUBLIC_URL configuration
- Fallback to HTTP_PROTOCOL://SERVER_NAME when S3 not configured
- Handle mixed database state (relative paths + existing full URLs)
- Update File model URL methods with S3/local logic
- Fix upload function to use configuration-based URLs
- Simplify Community/User/Feed image methods to use File model URLs
- Store relative paths in database for migration flexibility
Configuration:
- S3_PUBLIC_URL: Primary media base URL (e.g. 'https://media.example.com')
- HTTP_PROTOCOL + SERVER_NAME: Fallback for local serving
Fixes template relative path issues and double-https URL problems.
Enables production deployments to switch between local and S3 storage
without code changes or database migrations.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
- Add dynamic URL generation based on S3_PUBLIC_URL configuration
- Fallback to HTTP_PROTOCOL://SERVER_NAME when S3 not configured
- Handle mixed database state (relative paths + existing full URLs)
- Update File model URL methods with S3/local logic
- Fix upload function to use configuration-based URLs
- Simplify Community/User/Feed image methods to use File model URLs
- Store relative paths in database for migration flexibility
Configuration:
- S3_PUBLIC_URL: Primary media base URL (e.g. 'https://media.example.com')
- HTTP_PROTOCOL + SERVER_NAME: Fallback for local serving
Fixes template relative path issues and double-https URL problems.
Enables production deployments to switch between local and S3 storage
without code changes or database migrations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>