Files
evidencija-rezija/app
Knee Cola 0facc9c257 Add uploadProofOfPayment and improve file validation
- Implemented uploadProofOfPayment function for per-bill proof of payment
  - Validates file size using MAX_PROOF_OF_PAYMENT_UPLOAD_SIZE_KB env variable
  - Validates PDF file type
  - Prevents duplicate uploads with existence check
  - Uses optimized database projection to minimize data transfer
  - Updates specific bill using MongoDB array filters

- Refactored file validation in updateOrAddBill
  - Moved validation before serialization for fail-fast behavior
  - Added configurable file size limit from environment variable
  - Added PDF type validation
  - Improved error messages with specific validation failures

- Updated serializeAttachment function
  - Changed return type from BillAttachment to FileAttachment
  - Added uploadedAt timestamp to attachment object
  - Removed unsafe type cast

- Code formatting improvements throughout
  - Consistent spacing and indentation
  - Better TypeScript typing

This completes the per-bill proof of payment feature implementation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-07 12:24:52 +01:00
..
2024-01-15 15:31:13 +01:00
2024-01-15 15:26:17 +01:00
2024-01-15 15:47:02 +01:00
2024-01-15 15:47:02 +01:00
2024-01-15 15:47:02 +01:00
2024-01-15 15:47:02 +01:00
2024-01-15 15:47:02 +01:00
2024-01-15 15:47:02 +01:00
2024-02-17 09:14:06 +01:00