Don't run kill-buffer-hook or kill-buffer-query-functions.
Attach a file by drag & drop or click to upload