File column showing cached PDF, not linking to actual file

Hey everyone. I’m having a problem with a File column always showing an older version of a PDF (said PDF is created and updated via a workflow in the app).

  • I’ve got a workflow that creates a PDF (for an invoice) and saves it in a folder in the Gdrive associated with the app.
  • I’ve got an action that then writes the file path/name to a file column for the invoice record.

This gives me a column that I can click on to open the saved file… and all this works.

Until I make a change to the PDF; then I don’t see the newly updated file, instead I continue to see the version of the file that I opened immediately after it was created.

For example: say I trigger the workflow to create the invoice file and write the file path to the File column: after the sync cycle for creating the PDF is complete, I can click on the File column to view the file - and it works. Then if I make a modification (say some rewording of a line item or something) and re-trigger the workflow (which updates the PDF), when I tap the File column to view the file I still see the first version - but if I go and check the file in the cloud it indeed has been updated.

It’s like the system is caching a version of the file and showing me this, instead of pulling the file from the cloud when I click on it.

  • I’ve checked the the actual file in the cloud IS updated
  • I’ve confirmed the file name and path is correct (it wouldn’t open anything otherwise)
  • I’ve synced the app a bunch of times already (a dozen as of this writing).
  • I opened the app in a web browser (after clearing cache), thinking this would cause the browser to re-download the file

It has been about a 1/2 hour since I’ve made the last update to the file, and I’ve tried all of the above again to no success. (I was thinking maybe it was a time based thing: you know, we only check the file to see if it’s been updated every 30 min or something…)

I would just use a “GetAppFileURL” and make it work that way - but things are changing and that won’t work for very long.

@Phil any help would be appreciated. :nerd_face:

If you are reusing the image file URL and directly updating the contents of the image file, you will only see the updated image value once the cached image ages out of the Cloudflair cache.

If you enable “Secure Image Access” we do not cache the image in Cloudflair and image retrieval performance will suffer. You can enable “Secure Image Access” by going to Security > Options in the Editor.

I’ve always been under the impression that the cache time is huge, to the point that reusing a file name for downloadable content or images is discouraged.

The quoted text is about images, does that apply to PDFs as well?

And does this all mean that “eventually” the newest version will be shown?

Hello @MultiTech_Visions!

I’ve had a similar issue. Seems that it was solved by an workaround: using a sequence of actions. First erase the collumn value for this row then recreates.

But still there is a catch: do not try to open it before the app finish creating the PDF file.

1 Like

Your guess is as good as mine… :frowning:

That… sounds like a true work around. :laughing::nerd_face:
But it makes sense in a way; you clear it, then we put a value there that could be anything (even though it’s the same one) - but this would cause the system to re-ping the cloud for the file.