Based on ideas and code in PR #5560 by @MeirShpilraien.
Attach a file by drag & drop or click to upload