From 29d108d1e29f7da1bfa1111e2000bdfba5714bdd Mon Sep 17 00:00:00 2001 From: Yevgeniy Akimenko Date: Thu, 4 May 2023 12:01:36 -0700 Subject: [PATCH] removed formatPath function, also added missing regex to itemOne --- renderer/pages/index.tsx | 60 ++++++++++++++++++++++++++-------------- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/renderer/pages/index.tsx b/renderer/pages/index.tsx index cae1364..5c0ca7d 100644 --- a/renderer/pages/index.tsx +++ b/renderer/pages/index.tsx @@ -480,15 +480,6 @@ const Home = () => { resetImagePaths(); }; - const formatPath = (path) => { - //USE REGEX TO GET THE FILENAME AND ENCODE IT INTO PROPER FORM IN ORDER TO AVOID ERRORS DUE TO SPECIAL CHARACTERS - logit("📢 Formatting path: ", path); - return path.replace( - /([^/\\]+)$/i, - encodeURIComponent(path.match(/[^/\\]+$/i)[0]) - ); - }; - const allowedFileTypes = ["png", "jpg", "jpeg", "webp"]; const allowedVideoFileTypes = ["webm", "mp4", "mkv"]; @@ -629,7 +620,19 @@ const Home = () => { { setDimensions({ @@ -688,9 +691,13 @@ const Home = () => { Original {

Upscayl { {isVideo && videoPath.length > 0 && upscaledVideoPath.length === 0 && ( )}