Describe the bug: Temp files created for attachments may not be cleaned up if errors occur after creation.
To reproduce:
- Check attachment download code paths
- If error occurs after temp file created but before cleanup
- Temp files accumulate in system temp directory
Expected behavior: Use defer to ensure temp file cleanup even on error paths.
Additional context:
- Review view/html.go and attachment handling code
- Severity: Low-Medium - disk space leak
- Fix: Add defer os.Remove after temp file creation
Describe the bug: Temp files created for attachments may not be cleaned up if errors occur after creation.
To reproduce:
Expected behavior: Use defer to ensure temp file cleanup even on error paths.
Additional context: