try $file->getErrors()displaying after saving () and before redirecting to see if there are any errors
this will show you what the problem is. The most common is that you do not fill out the dependencies required for the model to insert a row into the database
to see it in a convenient format
CVarDumper::Dump($file->getErrors(),100,true)
source
share