CakePHP and file upload validation

I haven’t seen an approach to file upload validation explicitly laid out in the CakePHP documentation. In other words, how do you make sure the user has selected a file to upload before hitting the upload button. In my case, I’m uploading images. After trying a few things, here’s what I’ve used.
It may seem logical [...]