Better error handling. Removed unneeded internal variables.
Attach a file by drag & drop or click to upload