Avoid unnecessary access() call and make code read more linearly.
Attach a file by drag & drop or click to upload