fix: reintroduced check on file kind. But now works for .pdf, .img, .txt, ..

This commit is contained in:
Tobias Martine 2026-02-09 19:10:53 +01:00
parent 45e675c0e0
commit 70dac18fa3

View File

@ -156,10 +156,12 @@ class InputWaiter {
event.target.files = [];
for (let i = 0; i < items.length; i++) {
const item = items[i];
const file = item.getAsFile();
event.target.files.push(file);
if (item.kind === "file") {
const file = item.getAsFile();
event.target.files.push(file);
event.preventDefault(); // Prevent the default paste behavior
event.preventDefault(); // Prevent the default paste behavior
}
}
setTimeout(() => {
self.afterPaste(event);