Forum Discussion

MichaelTamoush's avatar
MichaelTamoush
Qrew Captain
4 years ago

Caching Issues on File Links

I typically use this syntax to make a file link field (that i can pass through lookup fields)

"<a href='"& URLRoot()&"up/"&Dbid()&"/a/r"&[Record ID#] & "/e6/v0' target='_blank' >" & [Field Name] & "</a>"

This works great, but is defeated by caching issues. For example, one file field was a .doc. This document was overrwritten by a pdf file with a different name, AND the originally .doc file was deleted.

However, users that have already cached it still see AND access the word document (even though it has been deleted in QB).

Has anyone encountered this, and does anyone know a fix?

------------------------------
Michael Tamoush
------------------------------
  • I can confirm I've encountered this... but don't have a solution to share :-(

    The only thing that comes to mind is using the actual 'latest' version number in the URL (vs the 'current' v0).

    This API run on the attachment field will return a list of versions that could be used, but it would be quite complex for something that should be easy. https://developer.quickbase.com/operation/runQuery

    -Sharon


    ------------------------------
    Quick Base Junkie
    ------------------------------
    • MichaelTamoush's avatar
      MichaelTamoush
      Qrew Captain
      if V0 is current, does that mean if you had 2 files uploaded, V2 would be the latest version? And if you had 3 files, V3 would be the latest version?

      Maybe I can just use V5 and it will default to the latest...?!

      ------------------------------
      Michael Tamoush
      ------------------------------
      • QuickBaseJunkie's avatar
        QuickBaseJunkie
        Qrew Captain
        You would need to know the exact 'latest' version v3, v5, v10... that's what v0 does for you, but as you've called out you then run into the caching issue.

        From the QB API Guide "Specifying 0 (zero) for the VID always gets you the most recent version."

        ------------------------------
        Quick Base Junkie
        ------------------------------