I would like to upload a .gpx-file (a GPS data file saved in the GPS Exchange format) in CodeIgniter 4. Using validation rules for an image file as a template (see below), I failed to modify it, so that the .gpx upload would work. Can somebody help me?
$validationRule = [
'userfile' => [
'label' => 'Image File',
'rules' => 'uploaded[userfile]'
. '|is_image[userfile]'
. '|mime_in[userfile,image/jpg,image/jpeg,image/gif,image/png,image/webp]'
. '|max_size[userfile,100]'
. '|max_dims[userfile,1024,768]',
],
];
Thanks!