fix: Dragging strings into document can attempt (and file) to insert as attachment
This commit is contained in:
@@ -74,7 +74,9 @@ const uploadPlugin = (options: Options) =>
|
||||
}
|
||||
|
||||
// filter to only include image files
|
||||
const files = getDataTransferFiles(event);
|
||||
const files = getDataTransferFiles(event).filter(
|
||||
(dt: any) => dt.kind !== "string"
|
||||
);
|
||||
if (files.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user