Based on a patch by Marius Cirsta. Fixes ticket #2016.
Attach a file by drag & drop or click to upload