tsteward Well-Known Member Licensed User Longtime User Oct 21, 2020 #1 My app loads some html from a database then sends the html text to a code module to look for my personal markups. In this case image file names are enclosed with {*image.jpg*} the code module then edits the html text to remove this markup and correctly add the image tags and www path to the html to display this image in a webview. I would like to download and save the images to prevent continually downloading the same image. My thoughts were: Check if file exists locally and if not then download the file. The markup processor would cope with the image file now being local. My problem seems to be that I can't use "wait" within a code module to wait for the image to be downloaded. How would you accomplish this? Any sample code appreciated. Tony
My app loads some html from a database then sends the html text to a code module to look for my personal markups. In this case image file names are enclosed with {*image.jpg*} the code module then edits the html text to remove this markup and correctly add the image tags and www path to the html to display this image in a webview. I would like to download and save the images to prevent continually downloading the same image. My thoughts were: Check if file exists locally and if not then download the file. The markup processor would cope with the image file now being local. My problem seems to be that I can't use "wait" within a code module to wait for the image to be downloaded. How would you accomplish this? Any sample code appreciated. Tony
DonManfred Expert Licensed User Longtime User Oct 21, 2020 #2 tsteward said: How would you accomplish this? Click to expand... Create a class or move the code to the starter service. Code module can not use Events. Upvote 0
tsteward said: How would you accomplish this? Click to expand... Create a class or move the code to the starter service. Code module can not use Events.