(cherry picked from commit e3c35026) (kept core part only to minimize changes)
Attach a file by drag & drop or click to upload