From 414182f5997be12646f2fe9881f62e277fc4627e Mon Sep 17 00:00:00 2001 From: David Luzar <5153846+dwelle@users.noreply.github.com> Date: Wed, 10 Sep 2025 17:59:02 +0200 Subject: [PATCH] fix: normalize file on paste/drop (#9959) --- packages/excalidraw/clipboard.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/excalidraw/clipboard.ts b/packages/excalidraw/clipboard.ts index 9eb101422..007a02161 100644 --- a/packages/excalidraw/clipboard.ts +++ b/packages/excalidraw/clipboard.ts @@ -30,6 +30,7 @@ import { createFile, getFileHandle, isSupportedImageFileType, + normalizeFile, } from "./data/blob"; import { tryParseSpreadsheet, VALID_SPREADSHEET } from "./charts"; @@ -472,7 +473,12 @@ export const parseDataTransferEvent = async ( const file = item.getAsFile(); if (file) { const fileHandle = await getFileHandle(item); - return { type: file.type, kind: "file", file, fileHandle }; + return { + type: file.type, + kind: "file", + file: await normalizeFile(file), + fileHandle, + }; } } else if (item.kind === "string") { const { type } = item;