I have added a workflow to the file uploader to check if the file type is image or not and if it is not an image the file is deleted the i reset relevant inputs.
the problem is when the user hover on the file uploader a tooltip appear with the name of the file which may confuse the user like in the screenshot below.
note the file uploader is above the image shown in this screenshot