This simplifies callbacks a bit, and fixes a race condition.
Attach a file by drag & drop or click to upload