1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-02-14 18:02:38 +01:00

Update formats

This commit is contained in:
Nayam Amarshe 2024-10-04 14:34:11 +05:30
parent 5470d5a731
commit 9e203194e0

View File

@ -89,9 +89,9 @@ const Home = () => {
const validateImagePath = (path: string) => {
if (path.length > 0) {
logit("🖼 imagePath: ", path);
const extension = path.toLowerCase().split(".").pop();
const extension = path.split(".").pop().toLowerCase();
logit("🔤 Extension: ", extension);
if (!VALID_IMAGE_FORMATS.includes(extension.toLowerCase())) {
if (!VALID_IMAGE_FORMATS.includes(extension)) {
toast({
title: t("ERRORS.INVALID_IMAGE_ERROR.TITLE"),
description: t("ERRORS.INVALID_IMAGE_ERROR.DESCRIPTION"),