- Transaction safety: Delete files AFTER database commit, not before
- Path consistency: Use site/ prefix and full S3 URLs in migration
- Error handling: Add ClientError handling with rollback on failures
- Resource cleanup: Track files to delete, only cleanup after successful commit
Files modified:
- app/admin/routes.py: Admin upload with try/except/finally
- app/cli.py: Migration command with error handling
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
- Transaction safety: Delete files AFTER database commit, not before
- Path consistency: Use site/ prefix and full S3 URLs in migration
- Error handling: Add ClientError handling with rollback on failures
- Resource cleanup: Track files to delete, only cleanup after successful commit
Files modified:
- app/admin/routes.py: Admin upload with try/except/finally
- app/cli.py: Migration command with error handling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>