Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { t } from "@lingui/core/macro";
import { useProjectById, useUploadConversation } from "@/lib/query";
import { LoadingOverlay } from "@mantine/core";
import { PropsWithChildren } from "react";
import { toast } from "../common/Toaster";
import { CommonDropzone } from "./Dropzone";

export const UploadConversationDropzone = (
Expand All @@ -14,6 +13,7 @@ export const UploadConversationDropzone = (
}>,
) => {
const uploadConversationMutation = useUploadConversation();

const projectQuery = useProjectById({
projectId: props.projectId,
});
Expand All @@ -37,17 +37,19 @@ export const UploadConversationDropzone = (
maxFiles={10}
maxSize={200 * 1024 * 1024}
onReject={(files) => {
toast.error(
alert(
t`Something went wrong while uploading the file: ${files[0].errors[0].message}`,
);
}}
loading={uploadConversationMutation.isPending}
accept={[
"audio/m4a",
"audio/x-m4a",
"audio/mp3",
"audio/wav",
"audio/mpeg",
"audio/ogg",
"audio/webm",
"video/mp4",
"audio/webm",
]}
>
{props.children}
Expand Down