`file-directory-p' to the filename part rather than to the whole text.
Attach a file by drag & drop or click to upload