at somepoint we really should split all this common code into a function...
Attach a file by drag & drop or click to upload