title: File uploads with CefSharp
body: <p>We are using CefSharp (v37.0.0 NuGet package) in a C# WinForms application. We are looking for a way to (programmatically) trigger file upload actions. How, if at all, can that be done?
  A couple of additional thoughts:</p>
  
  <ul>
  <li>We have a file upload dialog on a page where, normally, a user would select a file. This works fine, we intercept the dialog call via IDialogHandler and provide the file.</li>
  <li>Now we want to trigger the same dialog and pre-set the file. While the dialog opens successfully from an "ExecuteScriptAsync" call, we are unable to pre-select the file. Possibly due to the following reason: <a href="https://stackoverflow.com/questions/5933565/how-to-create-initialize-the-file-object-using-file-path-html5">how to create/initialize the file object using file path html5</a></li>
  <li>Our next idea was to have the dialog open normally and issue a click event programmatically so the browser would open the file dialog (which we would then catch via IDialogHandler and provide the file we desire).</li>
  <li>Trying this approach, our observation is as follows:</li>
  <li>Following a user action (e.g. button click inside the browser), we can programmatically "click" the file input button.</li>
  <li>Doing the same from a call originating via ExecuteScriptAsync, the dialog (or call in IDialogHandler) does not come up.</li>
  </ul>