@atlaskit/editor-plugin-image-upload
Version:
Image upload plugin for @atlaskit/editor-core
11 lines • 307 B
JavaScript
// Typeguard Function
export var isDragEvent = function isDragEvent(event) {
return 'dataTransfer' in event;
};
export function isDroppedFile(rawEvent) {
var e = rawEvent;
if (!e.dataTransfer) {
return false;
}
return Array.prototype.slice.call(e.dataTransfer.types).indexOf('Files') !== -1;
}