CodeIgniter Forums
File upload validation with same name - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: File upload validation with same name (/showthread.php?tid=72683)



File upload validation with same name - Vykintas - 01-23-2019

Hi, 

I try upload file with same name.


my code:


PHP Code:
$validation = \Config\Services::validation();

$validation->setRules([
     'files[]' => 'mime_in[files[],image/jpeg,image/pjpeg,image/png]'
]); 


And I get error this:
CRITICAL - 2019-01-23 15:57:24 --> Argument 1 passed to CodeIgniter\Validation\FileRules::mime_in() must be of the type string or null, array given, called in

So.. how to upload files with validations and same names


RE: File upload validation with same name - Juan Fajardo - 06-04-2020

Hi,
has you found the solution to this problem??

Tanks