|
Some checks failed
CI/CD Pipeline / Backend - Build, Test & Push (push) Failing after 1m32s
CI/CD Pipeline / Frontend - Build, Test & Push (push) Successful in 11m35s
CI/CD Pipeline / Integration Tests (push) Has been skipped
CI/CD Pipeline / Deployment Summary (push) Has been skipped
CI/CD Pipeline / Discord Notification (Failure) (push) Has been skipped
CI/CD Pipeline / Discord Notification (Success) (push) Has been skipped
Fixed CSV file upload to properly generate filename based on company name. The previous implementation tried to read `req.body.companyName` in multer's filename callback, but the body is not yet parsed at that point, causing files to be named "unknown.csv". ## Solution 1. Use temporary filename during upload (timestamp + random) 2. After validation and parsing, rename file to proper company name format 3. Delete old file if it exists before renaming 4. Store final filename in database configuration ## Changes - Multer filename callback now generates temporary filename - Added file renaming logic after successful validation - Updated database records to use final filename instead of temp name - Added logging for file operations ## Impact - New CSV uploads will have correct filenames (e.g., "ssc-consolidation.csv") - No more "unknown.csv" files - Existing "unknown.csv" needs to be manually deleted via dashboard 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| audit | ||
| auth | ||
| bookings | ||
| controllers | ||
| dashboard | ||
| decorators | ||
| dto | ||
| gateways | ||
| gdpr | ||
| guards | ||
| interceptors | ||
| mappers | ||
| notifications | ||
| organizations | ||
| rates | ||
| services | ||
| users | ||
| webhooks | ||
| csv-bookings.module.ts | ||