Upstreaming patch used by Chromium in https://codereview.chromium.org/693773003/
Attach a file by drag & drop or click to upload