Avoid the need for multiple potentially inconsistent access operations, slightly factorize code.
Attach a file by drag & drop or click to upload