disable better error message for videos on hosted version
This commit is contained in:
parent
ac86e42126
commit
ab8baca1ab
@ -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) =>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user