How to select and view picture in web app?

Hi,
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
FileUploader1.StartUpload
source = WebUploadedFile.Data
ImageViewer1.Picture = source

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

Please for advice,
Thanks

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.

simplified
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
  'f.Save(Session.Data.Path.Child(f.Name))
  'Next
  
  '---------------------------------------- Connect
  
  Var db As New MyDatabase
    
  '---------------------------------------- Large Objects
  
  db.BeginTransaction
  
  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)
    
  Next
  
  Try
    db.CommitTransaction
  Catch e As RuntimeException
    db.RollbackTransaction
    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.

https://docs.xojo.com/SpecialFolder

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.
https://docs.xojo.com/Category:Language_Reference

I think that for now I should stick to Bubble.io 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.