MCPcopy Index your code
hub / github.com/resend/react-email / handleDrop

Function handleDrop

packages/editor/src/plugins/image/file-handler.ts:24–38  ·  view source on GitHub ↗
(_view, event, _slice, moved)

Source from the content-addressed store, hash-verified

22 return true;
23 },
24 handleDrop(_view, event, _slice, moved) {
25 if (moved || !event.dataTransfer?.files?.[0]) {
26 return false;
27 }
28
29 const file = event.dataTransfer.files[0];
30 if (!file.type.includes('image/')) {
31 return false;
32 }
33
34 event.preventDefault();
35 void executeUploadFlow({ editor, file, uploadImage });
36
37 return true;
38 },
39 },
40 });
41}

Callers

nothing calls this directly

Calls 1

executeUploadFlowFunction · 0.90

Tested by

no test coverage detected