Group the common tests in a function shared between client and server.
Attach a file by drag & drop or click to upload