Ok so I have a multipart form:
<form id="form" method="post" enctype="multipart/form-data">
<input type="file" name="upload_avatar">
<input type="submit" value="Update" name="update_profile">
</form>
When I submit the form from the perspective of the controller action then
$this->request->hasFiles() ;
returns 1 wether a file exists or not.
As far as I can tell all it is testing for is the precense of the html input element of type file.
So my question is can anyone provide a solid example of the right context to use $this->request->hasFiles() as I'm having trouble seeing its use.
The reason is that what I want to quickly check to see that the post actually has a file attached.
Does anyone have a sensible comment? Apologies but I have found this very frustrating.