This is a generic and inefficient but functional implementation.
Attach a file by drag & drop or click to upload