I don't think it's possible. Running the following gives a popup blocked warning in Firefox:
JavaScript Code:
  1. $('input[type=file]').click()