also fixed some inconsistency between client and server validation.
Attach a file by drag & drop or click to upload