Because you posted to the Web Testing area of the forum, I assume you’re talking about a web app/web page - not a Windows app.
File uploads are handled by a specific HTML element with a type set to “file”:
<input type="file" ...>
Essentially, even though it may not look like one, the input type=“file” element behaves as a button. It responds to clicks like any other button.
Use the browser DevTools to examine the HTML on the page. It will help you find the file upload input element.