Based on patch by Philipp Hagemeister. This fixes a regression caused by revision f4377699fd47.
Attach a file by drag & drop or click to upload