TL;DR: How can I use QuickLook to preview links to Google Document files which require login to Google account?
I have a rather specific workflow: I use Rclone to have my Google Drive mounted as network drive, which makes all my Drive documents accessible from Finder. Now, with anything except Google Documents (e.g. image, text, pdf, music, video), pressing Spacebar will open macOS QuickLook and it will nicely display the file.
But when a file is actually a Google Document (i.e. Google Sheet, Google Document, Google Presentation), Rclone gives you a *.webloc file – that is, a link to a document URL. This is perfect, because you can actually view any Google document in a QuickLook preview without even bothering to open a browser. But that only works when the document is set to be accessible from anybody without login (General Access is set to “Anyone with the link”).
When I try to preview with QuickLook a Google Document file which has General Access sharing settings set to “Restricted” (and thus the file is only accessible to specific people with which it is shared), the preview opens a Google login page:
That would be OK, but I cannot interact with the form in (almost) any way,* so I cannot login to my Google account inside QuickLook. Thus the document is unviewable unless I open it in real browser. [* It is actually funny. I am able to write the first letter into the login page, but any consecutive keyboard presses are ignored. Neither was I able to paste the login data using Cmd+V, because those are actually two keyboard presses.]
So, in short:
- My goal is to use QuickLook to preview Google Document files which require login to Google account.
And my related questions are:
- Is it possible to allow interacting with the QuickLook preview of a webpage? (so that I can login to my Google account)
- If not, what “login” information does QuickLook use? Can I set the cookies/logged-in state somewhere manually? (what I definitely know and tested is that being logged in my Google account in Safari does not allow me to view the document in QuickLook)
In order to allow anyone to test it, I have created an example Google Document and here is an uploaded *.webloc file which links to it:
Downloading the file and simply pressing the Spacebar will show you a Google login page.
