Removed strict comparison for excel extension on import
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
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:
@@ -430,7 +430,7 @@ class InvoiceValidationResource extends Resource
|
|||||||
$originalName = $uploadedFile->getClientOriginalName(); // e.g. 3RA0018732.xlsx
|
$originalName = $uploadedFile->getClientOriginalName(); // e.g. 3RA0018732.xlsx
|
||||||
|
|
||||||
$extension = strtolower(pathinfo($originalName, PATHINFO_EXTENSION));
|
$extension = strtolower(pathinfo($originalName, PATHINFO_EXTENSION));
|
||||||
if ($extension !== 'xlsx') {
|
if ($extension != 'xlsx') {
|
||||||
throw new \Exception('Only .xlsx files allowed.');
|
throw new \Exception('Only .xlsx files allowed.');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -770,7 +770,7 @@ class InvoiceValidationResource extends Resource
|
|||||||
$originalName = $uploadedFile->getClientOriginalName();
|
$originalName = $uploadedFile->getClientOriginalName();
|
||||||
|
|
||||||
$extension = strtolower(pathinfo($originalName, PATHINFO_EXTENSION));
|
$extension = strtolower(pathinfo($originalName, PATHINFO_EXTENSION));
|
||||||
if ($extension !== 'xlsx') {
|
if ($extension != 'xlsx') {
|
||||||
throw new \Exception('Only .xlsx files allowed.');
|
throw new \Exception('Only .xlsx files allowed.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user