Use hashes to check if sync table images and files are indeed new

I know this is a bit niche, but hear me out.

  • Many APIs, when serving up files or images, present them as short-lived AWS links (valid for e.g. 15 minutes).
  • When a Pack fetches from these APIs, the appropriate way to store the data is with an Attachment or ImageAttachment column type (since URL or ImageURL column types would break after 15 minutes).
  • Often, the files/images at these endpoints aren’t actually new - but Coda doesn’t know that, because the temporary URLs are new. So Coda updates the image/file in its storage.

Feature request: Coda should use hashing or some similar approach to identify when a refresh of a sync table is feeding it the same file/image it already has for a cell.

K but… why? Is the current behaviour making anybody sad, beyond Coda’s server admins?

Yes! Some examples:

  • Coda docs maintain a history of their contents, including of sync tables. Even a small sync table that refreshes every hour for a few months gets so gummed up that the doc takes >6 minutes to copy or be template-cloned
  • New file attachments must be virus scanned, which blocks users from viewing them right after a sync (sometimes for upwards of 30 minutes (!) if the virus scanning service is overloaded and/or sync table is large)
1 Like

Running into this is now as well. Voted

1 Like

To work around the virus scanning issue, which has been causing my files to spend half their lives in non-visible state, I created this Pack to aid in implementing my own caching strategy in a separate column, and replacing my cached copy only if hashes don’t match: