From e461ee109f30367d1bc119f9e7e06acc0fc8d1e1 Mon Sep 17 00:00:00 2001 From: sumona-banerjeee Date: Wed, 25 Feb 2026 11:42:44 +0530 Subject: [PATCH] retrying issue in the upload section solve --- app/upload/page.tsx | 2 +- components/upload-section.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/upload/page.tsx b/app/upload/page.tsx index bfa5772..2314ab8 100644 --- a/app/upload/page.tsx +++ b/app/upload/page.tsx @@ -19,7 +19,7 @@ import { import { storeVideoFile } from "@/lib/video-storage" const API_URL = process.env.NEXT_PUBLIC_API_URL -const WS_URL = API_URL?.replace(/^https?:\/\//, "wss://") +const WS_URL = API_URL?.replace(/^https:\/\//, "wss://").replace(/^http:\/\//, "ws://") type DetectionType = "pothole-detection" | "sign-board-detection" | "pot-sign-detection" diff --git a/components/upload-section.tsx b/components/upload-section.tsx index 2dae39e..8917233 100644 --- a/components/upload-section.tsx +++ b/components/upload-section.tsx @@ -11,7 +11,7 @@ import { Upload, Loader2, AlertCircle } from "lucide-react" import type { DetectionData, DetectionType } from "@/lib/types" const API_URL = process.env.NEXT_PUBLIC_API_URL -const WS_URL = API_URL?.replace(/^https?:\/\//, "wss://") +const WS_URL = API_URL?.replace(/^https:\/\//, "wss://").replace(/^http:\/\//, "ws://")