Updated validation logic to allow invoice file size should be less than or equal to 50 KB
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled

This commit is contained in:
dhanabalan
2026-04-15 10:27:37 +05:30
parent e7dc16f444
commit a8ad8e2aba

View File

@@ -409,7 +409,8 @@ class InvoiceValidationResource extends Resource
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
// 'application/vnd.ms-excel', // Legacy .xls fallback if needed
])
->rules(['mimes:xlsx']) // Laravel validation: extension check
->rules(['mimes:xlsx', 'max:50']) // Laravel validation: extension check
->maxSize(50)
->preserveFilenames() // <- this keeps the original filename
->reactive()
->storeFiles(false) // prevent auto-storing, we will store manually
@@ -758,7 +759,8 @@ class InvoiceValidationResource extends Resource
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
// 'application/vnd.ms-excel', // Legacy .xls fallback if needed
])
->rules(['mimes:xlsx']) // Laravel validation: extension check
->rules(['mimes:xlsx', 'max:50']) // Laravel validation: extension check
->maxSize(50)
->preserveFilenames() // <- this keeps the original filename
->reactive()
->storeFiles(false) // prevent auto-storing, we will store manually