Fix per-bill proof of payment field name and add environment config
- Updated uploadProofOfPayment to expect 'proofOfPayment' field name instead of 'utilBillsProofOfPayment' for semantic clarity - Removed old not-found.tsx from deprecated route structure - Added required environment variables for file upload validation: - MAX_BILL_ATTACHMENT_UPLOAD_SIZE_KB=1024 - MAX_PROOF_OF_PAYMENT_UPLOAD_SIZE_KB=1024 - Updated package-lock.json with peer dependency metadata 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col items-center justify-center p-6 bg-base-300">
|
||||
<h2 className="text-2xl font-bold">Proof of payment not found</h2>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -492,7 +492,7 @@ export const uploadProofOfPayment = async (locationID: string, billID: string, f
|
||||
|
||||
try {
|
||||
// First validate that the file is acceptable
|
||||
const file = formData.get('utilBillsProofOfPayment') as File;
|
||||
const file = formData.get('proofOfPayment') as File;
|
||||
|
||||
// validate max file size from env variable
|
||||
const maxFileSizeKB = parseInt(process.env.MAX_PROOF_OF_PAYMENT_UPLOAD_SIZE_KB || '1024', 10);
|
||||
|
||||
Reference in New Issue
Block a user