I'm having an issue when I upload a file and save. The file is uploaded and the filepath is correct in the content file. When I go to edit the entry in the admin, the file shows up in the file field, but when I save is removed. The actual file is still there, but the field info on the content file is removed.

I've tracked it down to being case sensitivity of the file extension. So my file name is image.JPG and in my allowed types for that field, it's listed as 'jpg'.

So when the file select is being built, it doesn't pull in the .JPG file, isn't marked as selected, and is lost on form submission.

In _app/core/bundles/file/ft.file.php, line 63:

If you update the name method param from:

$finder->name("*.{$ext}");

to a case-insensitive regex:

$finder->name("/\.{$ext}/i");

Everything works as expected.

I think it makes sense that if I allow 'jpg' as a filetype that it would include all case'd types (JPG, jPg, Jpg, etc...) without having to explicitly list each one in the allowed types.

Answered by Jamie Wagner! Go to answer.