Hey there! I’m releasing a simple pack for some additional Google Drive functionalities: Google Drive Extra
Install
When adding the pack to your doc you will be prompted to sign in to your google account. The app is not yet verified, that will take 4-6 weeks if they even approve it:
Just click “Show Advanced” and then “Go to coda.io (unsafe)” to continue like normal.
The pack only connects to Google’s API as shown here
Formula: DownloadDriveFile(url)
It can download private files from your drive directly into coda. It returns a temporary Coda URL, to store it permanently you can ingest it. Here are full instructions:
Get the url to your google drive file (Easy to get these from the official drive pack)
Put this URL in a column in a table
Create a new column of the type File in the table
Create a button that puts the result from DownloadDriveFile into this file column
I just tried to download video files (around 100 - 200 MB). Unfortunately, that didn’t work as intended. I then tried again with another file that was only 1 MB and that worked.
My guess is that there are limits. Do you know anything about that?
It shows this error:
Google Drive Extra error
Failed to take action in Google Drive Extra
I am on Team plan and everything with a maximum file size of 250 MB should work, so my Coda settings are not the problem. The link is also right.
Hej Jannis thanks for reaching out!
I’m afraid this is the 4MB limit discussed here
I enabled source code sharing on this pack if you’d like to have a look, I can’t think of a solution right now other than sharing the drive file to anyone with a URL and ingesting that directly into a Coda file column without auth
No worries! Increasing that limit doesn’t seem ideal, 4 MB is pretty high already for a single request. The solution should be for Coda to download the file in chunks but I can’t find any way for it to happen inside the pack.
I had some hope when I found this section in Coda’s documentation on private images which lets us feed an entire URL to Coda’s blob creator. But it seems it doesn’t do chunking either, instead trying to download the whole thing in one go, thus giving us the same error
Formula DownloadDriveFile failed: 13 INTERNAL: FetchError: content size at https://www.googleapis.com/drive/v3/files/1o-jIfjt...?alt=media over limit: 4194304
4194304 bytes = 4 MiB = 4.19 MB
I think our best bet is to ask if Coda could make this function download content in chunks to match the workspace file size limit:
Filenames stopped working after latest update, I failed getting them working again. I believe there’s a bug with ingesting temporary URLs yielded from context.temporaryBlobStorage.storeUrl where the filename isn’t transferred, I emailed Coda about this
Filenames are working! I was confused by what I believe was caching behavior, all good now