Don't presume an error's second element is a string. Use looking-at rather than buffer-substring + member.
Attach a file by drag & drop or click to upload