My specifications are:
- Linux Mint
- LinuxValet.plus as web server
- GroceryCrudEnterprise 2.9.4
- CodeIgniter 4
I set the upload folder to public/uploads, then I do:
$uploadValidations = [
'maxUploadSize' => '20M', // 20 Mega Bytes
'minUploadSize' => '1K', // 1 Kilo Byte
'allowedFileTypes' => [
'gif', 'jpeg', 'jpg', 'png', 'tiff'
]
];
$crud->setFieldUpload('thumbnail', 'uploads', base_url() . '/uploads', $uploadValidations);
The error I get:
<b>Fatal error</b>: During inheritance of SplFileInfo: Uncaught ErrorException: Return type of Upload\File::getExtension() should either be compatible with SplFileInfo::getExtension(): string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /paud/app/Libraries/GroceryCrudEnterprise/codeguy/upload/src/Upload/File.php: 187