You could check the Name attribute of FileDocument in a microflow that is connected to the before commit event of the inherited object. If it is empty there is no file uploaded otherwise there is. Let the microflow return false if you want to abort the commit else return true.