Skip to content

Commit

Permalink
Merge pull request #49 from metakgp/upload-endpoint
Browse files Browse the repository at this point in the history
Upload endpoint
  • Loading branch information
rajivharlalka authored May 9, 2024
2 parents 9f8815d + 213d925 commit d5aeb66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ func populateDB(filename string, fileNameLink string) error {
year, _ := strconv.Atoi(qpData[2])
exam := qpData[3]
fromLibrary := false
fileLink := fmt.Sprintf("%s/%s", staticFilesUrl, fileNameLink)
fileLink := fmt.Sprintf("%s/iqps/uploaded/%s", staticFilesUrl, fileNameLink)
query := "INSERT INTO qp (course_code, course_name, year, exam, filelink, from_library,course_details) VALUES ($1, $2, $3, $4, $5, $6,$7);"

_, err := db.Exec(query, courseCode, courseName, year, exam, fileLink, fromLibrary, courseDetails)
Expand Down
1 change: 1 addition & 0 deletions frontend/src/pages/UploadPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ const UploadPage: Component = () => {
<p>Click "Choose File" to select your PDF.</p>
<p>Click "Upload" to submit.</p>
</div>
<h3>NOTE: The uploaded paper will be searchable only after manual review process first. Please wait for a few days and do not re-upload.</h3>
</div>
</div>

Expand Down

0 comments on commit d5aeb66

Please sign in to comment.