I am curious - are we supposed to be going back to the use of Var?
And I get an error that Files does not exist.
Var saveFile As FolderItem
For Each file As WebUploadedFile In Files
saveFile = SpecialFolder.Documents.Child(file.Name)
Try
file.Save(saveFile)
Catch e As IOException
// File Error, skip file
Continue
End Try
Next
Is this code old or new? I am using Xojo 2018r3 - did the Dim disappear in the new release??
I ask this because the code reference said the page “was last edited on 25 August 2019, at 18:04.”
Var can be used instead of Dim in newer versions of Xojo (2019r2 and newer). Dim can also be used, it didn’t disappear just that API 2.0 the use of Var is preferred.
dont try and use the code from the wiki in 2018r3
the code on the wiki is for the current version and you’re using an older release
switch your version to use the local help instead and that will give you help that is more consistent with the version you’re using
Preferences > General > When seeking help > Use Built in documentation
I’ve already got it set to that. Thanks for the Wiki tip-off.
So this bit where it mentions “Files” - what exactly is Files? It’s not mentioned in the help documentation as its own entity. It is mentioned in the WebPicture.Constructor as an array but is not mentioned in WebUploadedFile.
I figured it out. Files() as WebUploadedFile is a parameter that is already declared in the UploadComplete event handler and would have to be declared as incoming parameter in any method I create…
Still trying to get this to work but hey - I stepped forward one baby step.