function so that we can reuse that support for off-screen windows.
Attach a file by drag & drop or click to upload