Assume that Google Drive files must be PDFs
- Dominant language
- Python
- Stars
- 53
- Forks
- 16
- Avg merge
- 14d 5h
- Merged PRs (30d)
- 14
Description
We know that a Google Drive file must be a PDF so we can save network requests by just setting the Via 3 URL to Via 3's `/pdf/` endpoint directly.
The backend code doesn't currently have a separate view for Google Drive assignments like it does for Canvas files, and the backend doesn't distinguish Google Drive URLs from public URLs in general. So this may require changing the frontend to send an additional parameter to the backend letting it know when we have a Google Drive assignment.
Or this could be much simpler: we could just match [a regex](https://github.com/hypothesis/via3/blob/bc783a04c43a14642a45a1a327617afc8cd05160/via/get_url_details.py#L16-L18) against the file URL and assume it's a PDF if it looks like a Google Drive URL, and set the Via 3 URL to the `/pdf/` endpoint directly.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.