Well, I have to say that there is no cross-browser way to do this. Text that is not selected for the file is located in the part of the widget defined by the implementation and is completely browser dependent. and if necessary, you can simply use CSS to cover the text with something when the value attribute is empty.
source share