Hook on file upload
I need a hook or some way to detect when the window to select the file to upload is opened. I'm talking about the window that opens the browser to select the local files to upload.
Context: On occasions, WordPress itself or some plugins directly open a window to select the local file to upload, without going through the WordPress library. I have a plugin that gives a custom path when uploading files and I need to launch a popup window just before the user goes to select the file to upload so that they can select the path where it will be saved.
The popup with the selector is done, I just need to find the time to launch it, that's the help I need.
Before asking this question I did a search but I didn't find anything about it. No hook acting at that time. I thought about detecting it with javascript but I don't know how to do it.
Please help