allow dropping files as input

This commit is contained in:
Bruno 2024-08-06 04:14:31 -03:00
parent 70aff69fe8
commit 29a3327284
No known key found for this signature in database
GPG key ID: D3A9EB63BAABEA28

View file

@ -188,13 +188,13 @@ function Modal({ modalProps }: { modalProps: ModalProps; }) {
|| blob.type.includes("codecs") && !blob.type.includes("opus")
);
const handleDrop = async event => {
const handleDrop = async (event) => {
event.preventDefault();
const file = event.dataTransfer.files[0];
if (file) setAudioBlob(file);
};
const handleDragOver = event => {
const handleDragOver = (event) => {
event.preventDefault();
};