From c22f2dd07768ca808583bf37e0fa839a2851a492 Mon Sep 17 00:00:00 2001 From: Rajiv Harlalka Date: Fri, 10 May 2024 01:12:52 +0530 Subject: [PATCH] kuch kuch ho gya Signed-off-by: Rajiv Harlalka --- backend/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/main.go b/backend/main.go index 401f525..eb8f71a 100644 --- a/backend/main.go +++ b/backend/main.go @@ -147,7 +147,7 @@ func search(w http.ResponseWriter, r *http.Request) { http.Error(w, err.Error(), http.StatusInternalServerError) return } - qp.FileLink = fmt.Sprintf("%s/%s", staticFilesUrl, url.PathEscape(qp.FileLink)) + qp.FileLink = fmt.Sprintf("%s/%s", staticFilesUrl, qp.FileLink) qps = append(qps, qp) } @@ -230,7 +230,6 @@ func upload(w http.ResponseWriter, r *http.Request) { continue } else if errors.Is(err, os.ErrNotExist) { filePath = fmt.Sprintf("%s-%d.pdf", filePath[:len(filePath)-4], i) - fileName = fmt.Sprintf("%s-%d.pdf", newFileName, i) break } else { resp.Status = "failed"