So in my application i am able to upload a image , but since the method $this->request->hasFiles() returns a int i can't verify if there is a an actual file upload. Example :

1 - Form input : 1 text fied & 1 file field

2 - If only text is inputed, for the file field the method should return 0 , but returns 1 because i have 1 input field