Jump to content


Photo

TUnimImage - Replace Current URL Image issue ?

TUnimImage URL

  • Please log in to reply
8 replies to this topic

#1 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 155 posts
  • LocationMelbourne Australia

Posted 28 November 2017 - 04:25 AM

I have a MobileApp that uses a TUnimDBListGrid and on the Disclosure event shows another Formm where we update the TUnimImage (MapImage) URL from db table file export. 
 
Problem is after the first successful URL load, all future URL loads are ignored and the original does not change ? Please advise.
 
MapmForm.MapImage.Url:= 'files\temp.jpg';
UniSession.AddJS(MapmForm.MapImage.JSName+'.Refresh;');
 

  • 0

Andy


#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 28 November 2017 - 06:08 AM

Hi,

 

Sorry, I couldn't reproduce this issue


  • 0

#3 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 155 posts
  • LocationMelbourne Australia

Posted 28 November 2017 - 06:30 AM

How does one remove picture ?


  • 0

Andy


#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 28 November 2017 - 06:32 AM

UnimImage1.Url := '';

 ?


  • 0

#5 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 155 posts
  • LocationMelbourne Australia

Posted 28 November 2017 - 06:59 AM

Does not remove Image, I cannot change image ?


  • 0

Andy


#6 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 155 posts
  • LocationMelbourne Australia

Posted 28 November 2017 - 07:03 AM

Is there a UniSession.AddJS way to change the image URL ? 


  • 0

Andy


#7 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 28 November 2017 - 11:47 AM

I couldn't reproduce your issue, please make a simple testcase for this
  • 0

#8 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 155 posts
  • LocationMelbourne Australia

Posted 28 November 2017 - 08:25 PM

Work Around:-

 

I was using the same file name 'temp.jpg' and changing the contents of that file but now I have changed my code to generate a random file name '?????????.jpg' every time. 


  • 0

Andy


#9 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3625 posts

Posted 01 December 2017 - 03:48 PM

Hi,

 

Work Around:-

 

I was using the same file name 'temp.jpg' and changing the contents of that file but now I have changed my code to generate a random file name '?????????.jpg' every time. 

 

Also you can try to use this approach:

MapmForm.MapImage.Url:= 'files/temp.jpg?' + FormatDateTime('ddmmyyyyhhmmss', Now);

Best regards,


  • 0





Also tagged with one or more of these keywords: TUnimImage, URL

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users