diff --git a/frontend/src/components/ImageUpload.tsx b/frontend/src/components/ImageUpload.tsx index 8573824..c598ee0 100644 --- a/frontend/src/components/ImageUpload.tsx +++ b/frontend/src/components/ImageUpload.tsx @@ -8,6 +8,7 @@ import { Badge } from "./ui/badge"; import ScreenRecorder from "./recording/ScreenRecorder"; import { ScreenRecorderState } from "../types"; import { IS_RUNNING_ON_CLOUD } from "../config"; +import { addEvent } from "../lib/analytics"; const baseStyle = { flex: 1, @@ -83,6 +84,17 @@ function ImageUpload({ setReferenceImages }: Props) { "video/webm": [".webm"], }, onDrop: (acceptedFiles) => { + if (IS_RUNNING_ON_CLOUD) { + const isVideo = acceptedFiles.some((file) => + file.type.startsWith("video/") + ); + if (isVideo) { + toast.error("Videos are not yet supported on the hosted version."); + addEvent("VideoUpload"); + return; + } + } + // Set up the preview thumbnail images setFiles( acceptedFiles.map((file: File) =>