mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-04 20:47:42 +03:00
Fix image uploading
This commit is contained in:
parent
78a6624dd5
commit
b3a04fdada
@ -32,7 +32,11 @@ export default function ImageEntry({
|
||||
const [preview, setPreview] = useState<string | null>(null);
|
||||
|
||||
const formSchema = z.object({
|
||||
file: z.instanceof(File, { message: "Please select an image file." }),
|
||||
file: z
|
||||
.instanceof(File, { message: t("imageEntry.validation.selectImage") })
|
||||
.refine((file) =>
|
||||
accept["image/*"].includes(`.${file.type.split("/")[1]}`),
|
||||
),
|
||||
});
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
|
||||
Loading…
Reference in New Issue
Block a user