Discussions

Expand all | Collapse all

Caching Issues on File Links

  • 1.  Caching Issues on File Links

    Posted 30 days ago
    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
    ------------------------------


  • 2.  RE: Caching Issues on File Links

    Posted 29 days ago
    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
    ------------------------------



  • 3.  RE: Caching Issues on File Links

    Posted 29 days ago
    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
    ------------------------------



  • 4.  RE: Caching Issues on File Links

    Posted 29 days ago
    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
    ------------------------------



  • 5.  RE: Caching Issues on File Links

    Posted 25 days ago
    Is there a way to get the name of each version? Instead of referencing the version as a file link, just reference each version and check it's file name? Then we could use a series of 5 if statements to try to tell it to link a specific version??

    ------------------------------
    Michael Tamoush
    ------------------------------



  • 6.  RE: Caching Issues on File Links

    Posted 25 days ago
    OK. I just tested. If I reference the specific version, it works, so this leads to the question - can we somehow test to see which version we are on? If so, we can defeat the caching issue with a series of if statements.

    ------------------------------
    Michael Tamoush
    ------------------------------



  • 7.  RE: Caching Issues on File Links

    Posted 25 days ago
    That is the qustion... and one I don't have a direct answer for.

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