Fix non-file-visiting-buffer case. (Bug#22678) (cherry picked from commit 73873825)
Attach a file by drag & drop or click to upload