Skip to content

Commit

Permalink
fix(FormEditor): convert filelist to array
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisVorop committed Feb 15, 2024
1 parent 5f3d5dd commit ac778fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/FormEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -406,15 +406,15 @@ export const FormEditor = React.forwardRef<HTMLDivElement, FormEditorProps>(
(e: React.ClipboardEvent<HTMLDivElement>) => {
if (!e.clipboardData.files.length) return;

uploadFiles(e.clipboardData.files);
uploadFiles(Array.from(e.clipboardData.files));
},
[uploadFiles],
);

const onFileInputChange = async (e: React.ChangeEvent<HTMLInputElement>) => {
if (!e.target.files) return;

await uploadFiles(e.target.files);
await uploadFiles(Array.from(e.target.files));
};

const uploadInputProps = getInputProps();
Expand Down

0 comments on commit ac778fb

Please sign in to comment.