Image preview formula not showing new file

  • 0
  • 1
  • Question
  • Updated 1 month ago
  • Answered
I have a formula field that takes multiple image attachments and displays them on a form.  formula is:


List(" ",
If([Image 18]="", "", "<img width=\"240\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e53/v0\" />"),
If([Image 19]="", "", "<img width=\"240\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record 
If([Image 25]="", "", "<img width=\"240\" src=\"" & URLRoot() & "up/" & Dbid () & "/a/r" & [Record ID#] & "/e95/v0\" />")
)



The problem I am facing is that when i change the actual attachment, the formula still shows the old picture.  Even if i delete all previous revisions - it still shows the same older file preview.

If somone can assist, I would appreciate it

Photo of Geoffrey

Geoffrey

  • 1,980 Points 1k badge 2x thumb

Posted 1 month ago

  • 0
  • 1
Hey, did you try to check in the different browser? Generally, sometimes browser cached the image.

I would suggest to refresh the page or see the same report in a different browser.

Thanks,
Gaurav
Photo of Geoffrey

Geoffrey

  • 1,980 Points 1k badge 2x thumb
Hi.  So this will be too cumbersome to apply across my company.  I cant have everyone clear their cache every time a file gets changed - is there any alternative way of approaching this?  Maybe a better use of the formula?
See, it only applies to your browser. If you change any image and you do not see the new one it does not mean that other folks will see the same. Other folks will see the new image only.

Thanks,
Gaurav
Photo of Geoffrey

Geoffrey

  • 1,980 Points 1k badge 2x thumb
Not necessarily, because they have seen the image before I have changed it.  So that means they will still see the same image.  Am I correct?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 69,724 Points 50k badge 2x thumb
I had this problem myself.

I think that they design Quick Base to cache the file images if the record is viewed in the Browser within a certain number of minutes. I don’t recall what that number is but it might be about 15 minutes. So in practical terms it may not be a big issue since uploaded images tend to be stable once uploaded and the system will catch up to the change in about 15 minutes anyways. So it may be more of a fear during the testing process that the system is not refreshing to the current file, but in practical terms it will be ok for all users in 15 minutes after the file change, and of course immediate if the user never viewed the image the first time.

But a client had a problem with that and I did this

var text URL = URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e15/v0/ target=_blank" & "DummydateTime=" & ToText(Now()) & URLEncode(ToText([IP Image Location])); // that last part is to defeat browser cacheing

var text words = "

The effect was to cause the URL to change when the current changed or the name of the uploaded file changed. Those extra parameters are not valid parameter names and are ignored in practice, but it does cause the URL to be different each minute and hence default coaching. But there will be a slight performance hit for the app when you defat cacheing.
Thank you for your solution, Mark. :)