fixed some bugs and mitigated the other (closeInputStream() that does not actually flush completely)
Attach a file by drag & drop or click to upload