How to simulate click() on file input with Popups blocked?

I found the best way to solve this it to simply open a new tab with an html file to import files and when done close the tab.