From 2eca53d2198313c79fce13d063903d490eebfecb Mon Sep 17 00:00:00 2001 From: "Muhammad A. Ghorbani" Date: Sat, 12 Sep 2026 20:36:29 +0330 Subject: [PATCH] =?UTF-8?q?fix(photo-upload):=20revert=20uploadUrl=20to=20?= =?UTF-8?q?direct=20NEXT=5FPUBLIC=5FAPI=5FBASE=5FURL=20=E2=80=94=20proxy?= =?UTF-8?q?=20caused=20502=20on=20mobile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Componentes/question-photo.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/Componentes/question-photo.tsx b/src/components/Componentes/question-photo.tsx index 8c6a778..67f496d 100644 --- a/src/components/Componentes/question-photo.tsx +++ b/src/components/Componentes/question-photo.tsx @@ -276,10 +276,7 @@ export function QuestionPhoto({ question.ui_config?.source || "gallery"; - const uploadUrl = - typeof window !== "undefined" - ? `${window.location.origin}/api/proxy?__proxyPath=/upload-tmp-media/` - : undefined; + const uploadUrl = `${process.env.NEXT_PUBLIC_API_BASE_URL ?? ""}/upload-tmp-media/`; uploadFile({ requestId: String(question.id),