How to select and view picture in web app?

I am trying to open picture from HDD through simple web app.
I have Button, ImageViewer and Fileuploader.

The code on Button pressed is:

Var source As Picture
source = WebUploadedFile.Data
ImageViewer1.Picture = source

The error is:
This item does not exist
source = WebUploadedFile.Data

Please for advice,

WebFileUploader should be part of the web page and you need to process/copy the files in the event UploadFinished. after UploadFinished the files are gone.
and you need min. Xojo 2021r1.1

Thanks @MarkusR for all your support.
I guess I have problem with lack of tutorials for developing web application.

save as file (with a prepared path property) and also save into postgreSQL

Sub UploadFinished(Files() As WebUploadedFile) Handles UploadFinished
  System.DebugLog CurrentMethodName
  'For Each f As WebUploadedFile In Files
  'System.DebugLog f.Name + " Size " + f.Size.ToString
  '---------------------------------------- Connect
  Var db As New MyDatabase
  '---------------------------------------- Large Objects
  For Each f As WebUploadedFile In Files
    System.DebugLog f.Name + " Size " + f.Size.ToString
    Var obj_id As Integer = db.CreateLargeObject
    Var largeObject As PostgreSQLLargeObject = db.OpenLargeObject(obj_id)
    largeObject.Write f.Data
    Var row As RowSet = db.SelectSQL("insert into files (obj_id,mime_type,name,datetime) values($1,$2,$3,$4) returning files_id",obj_id,f.MIMEType,f.Name,DateTime.Now)
  Catch e As RuntimeException
    MessageBox e.Message
  End Try
End Sub

PDF tutorial “Introduction to Xojo Programming” is good only for desktop app development, and it is very hard to learn web development in Xojo by this tutorial. Besides that, there are some videos but are advanced and assuming that this PDF tutorial helped me to understand basics of web development in Xojo.
I want to build product ordering web app for my company, and at the moment my key issues are Working folders with web app, Putting a picture into a file of a product.
Any suggestions on how to approach in learning web development with Xojo?

the main difference in a web app is that it runs as one app and each user have it session object.

because the web app running as service or daemon it must have access/permissions to your data folders in NAS.

because each object which u are using have a class, have a look in online docu
and look at the methods, propertys overview.
start with a search for a class name.

I think that for now I should stick to platform to develop web app that I need for my company.
But I will keep on learning Xojo for developing desktop apps for other ideas that I have.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.