FolderItem in Web

Dim UserFile, NewFile, PicFolder as FolderItem   

UserFile= GetOpenFolderItem ("")
ImageViewer1.Image = Userfile.OpenasPicture

I have the following code in the desktop app. That opens a picture and puts it into a ImageViewer. Which seems to work well.

I am wanting to write this for the web (so that ultimately I can write a documentation manager, but it would appear that GetOpenFolderItem is not available in the web.

What is the equivellent way of doing this on the web app or is there no way to open a local file and diplay on a webpage

Hi Chris,

which Xojo version are you using - it’s important to know to help you. The documentation reads:

This item was deprecated in version 2019r2. Please use FolderItem.ShowOpenFileDialog as a replacement.

If your Xojo is newer than 2019r2, you have to use ShowOpenFileDialog.

I am not sure in a Web project you can open a file from your computer this way, don’t forget that a Web app works on a server. One other thing is are you using Web 1.0 or Web 2.0 ?

I know I asked more questions than I answered !

Yes I am on the latest version of Xojo 20231 . Even when I use Showopenfiledialog it does not work in the web

Var f as folderitem

f = folderitem.ShowOpenFileDialog("")

Why would you not be able to open it, millions of websites do it Allow you to open a file and “upload” it to website.

Re web 1.0 or 2.0. Whatever comes with latest version of Xojo

Chris,

for web you would use WebFileUploader

https://documentation.xojo.com/api/user_interface/web/webfileuploader.html

Thank you that seems do he trick. Thanks

@Chris_Timm

You are welcome