metakgp / iqps-go

Search for question papers when the library can't save you.
https://qp.metakgp.org
GNU General Public License v3.0
16 stars 10 forks source link

New Upload Flow #88

Open harshkhandeparkar opened 2 weeks ago

harshkhandeparkar commented 2 weeks ago
  1. Currently uploaded papers are named course_code_exam_semester_year.pdf and stored in /iqps/uploaded/. This prevents multiple people from uploading the same paper. This also means that if someone uploads an incorrect paper or low quality paper, a different person cannot upload a better paper or correctly tagged paper.
  2. Instead, each new upload can be saved under /iqps/uploaded/unapproved/id.pdf
  3. Once approved, it can be moved to /iqps/uploaded/approved/course_code_exam_semester_year.pdf
  4. The frontend can warn uploader that a paper has already been uploaded (and maybe show preview) and allow them to choose to still upload if they believe their version is better.
  5. Addendum: Currently uploaded qp details are parsed directly from the filename in the coursecode_name_year_exam_semester.pdf format. This will have to be changed for two reasons: a. The papers are to be saved under id.pdf in the new flow. b. Invalid characters or dangerous characters (/) could be sent and could lead to the system crashing or saving in a different folder/overwriting etc. It would be best to send this data in a separate json.