Based on the original code from David Christensen, modified by me.
Attach a file by drag & drop or click to upload