Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Refreshing TIWBSImage
#1
I have a TIWBSImage on a form.  I then use the TIWFileUploader to upload a new logo.  However, I notice that the TIWBSImage does not update with the new image unless I completely close the browser (close the session) and re-open it.  The reason is that the form is pulling the image from the IW cache, instead of the relative URL file path I've set in the TIWBSImage property as shown below:

This code works when the form loads:

Code:
    CurDir := TIWAppInfo.GetAppPath;
    logodir:='/iwbs/images/';
    logostr:=Curdir+'wwwroot/iwbs/images/'+tenant+'logo.png';
    if (fileexists(logostr)) then
    begin
      currentLogo.ImageFile:=logodir+tenant+'logo.png';
      tenantTabOptionsPage3.Repaint;
    end;

But after this point, the image always loads from the cache (which is different URL than the coded URL).  So uploading a new image has no effect until the session is restarted.

How can I always pull the image from the ImageFile property instead of the cache?
Reply


Messages In This Thread
Refreshing TIWBSImage - by pdinsd - 10-10-2019, 07:12 PM
RE: Refreshing TIWBSImage - by kudzu - 10-10-2019, 08:59 PM
RE: Refreshing TIWBSImage - by Jose Nilton Pace - 10-11-2019, 05:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)