Skip to content

Commit

Permalink
Merge pull request #55 from metakgp/upload-endpoint
Browse files Browse the repository at this point in the history
kuch kuch ho gya
  • Loading branch information
harshkhandeparkar committed May 9, 2024
2 parents 2fd09a7 + c22f2dd commit c7d123c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit c7d123c

Please sign in to comment.