Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support downloading pdfs from Google Drive rather than Dropbox #144

Closed
samuel-yeom opened this issue Oct 2, 2020 · 3 comments
Closed

Support downloading pdfs from Google Drive rather than Dropbox #144

samuel-yeom opened this issue Oct 2, 2020 · 3 comments

Comments

@samuel-yeom
Copy link
Contributor

The staff now uses a Google shared drive to store puzzles, so it would be nice if the server can download files from a public Google Drive link.

Currently, the server tries and fails to load the Google Drive preview of the pdf.

@dlareau
Copy link
Owner

dlareau commented Oct 3, 2020

How far would just adding a file upload button get towards satisfying your current workflow?

Google is being google and apparently a share link doesn't support any sort of normal file getting. The options knowing that are as follows:

  1. You go through the process of creating the download link for each file before you put it in, which involves copying out the file ID from the URL and into a template link. (This sounds like it sucks a lot but requires no modifications)
  2. I modify the backend to use some google drive command line fetch tool, this seems particularly brittle, and would need the user to specify on the front end for each puzzle if the source of the puzzle is google drive (I could of course make it true by default). I don't love this solution as it breaks the sort of abstraction layer of not having to care where the PDF is from (the current solution doesn't bake in dropbox in any way, it just calls wget and dropbox actually gives the file upon attempting to download a share link like a reasonable file hosting server, unlike google). However this solution is essentially the only way to get the behavior you asked for which is what matters in the end.
  3. Go through with adding a file upload button already like I've been posturing to do in Make the server easier to use for other hunts #121 . This makes it very universal and possibly easier for iterative development, but if your files are already all in the cloud it adds another step of downloading them rather than removing a step of uploading them.

Lemme know what you think.

@samuel-yeom
Copy link
Contributor Author

I think the third solution is the best, especially since it's the most intuitive for new staff members.

@dlareau
Copy link
Owner

dlareau commented Oct 22, 2020

Now in v4.1.0, to be deployed very soon.

@dlareau dlareau closed this as completed Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants