Lets say I have a standard file uploader, and a simple image below it, I want to be able to display the image on page as soon as it is uploaded. Have tried every iteration I can think of by setting image.source to methods of Media Object. I assumed there has be a way to display an image from cache vs uploading and storing the image permanently. I have figured out how to store the file to table, and then display image from table, but am looking to display the image from immediate upload cache not permanent location. Is this functionality possible or am i missing something super simple?
Simple Example
class Form1(Form1Template):
def __init__(self, **properties):
# You must call self.init_components() before doing anything else in this function
self.init_components(**properties)
def file_loader_1_change (self, files, **event_args):
# This method is called when a new file is loaded into this FileLoader
orig_pic = self.file_loader_1.file
self.image_1.source = orig_pic #have tried many different iterations, orig_pic.url, etc.
self.image_1.visible = True