Rovak / InlineAttachment

Easily paste and upload files/images in plain textareas
http://git.razko.nl/InlineAttachment
MIT License
620 stars 77 forks source link

fix bug where pasting a string causes upload #68

Closed zilkey closed 8 years ago

zilkey commented 8 years ago

This PR fixes a bug that occurs when users have allowedTypes: '*' and they paste a string. Before this PR, it would attempt (and fail) to upload a file, and insert the [Uploading file...]() message in the editor.

This PR fixes that by returning false from inlineAttachment.prototype.isFileAllowed if the pasted item is a string.