How to know the actual file before upload in WebFileUploader

Is there any way to know the actual file(not just the name) in the fileAdded event of WebfileUpload control. I need to show the file if its a picture in a imageview control before upload.

The name is the only thing you have. You’ll have to parse the name to determine what type of file it is. Of course that’s no guarantee, but it’s a start.

Its not for parsing the file type. I need to show the picture in a webimageview before the upload happens. so i guess there is no way to find the actual file before the uploadcomplete happens.

That’s not possible with the WebFileUploader. Not even with native web controls as you’d have the picture uploaded first before you can do anything with it like displaying in an ImageView control. Maybe it could be done with a custom control and some Javascript to read the file and send a thumbnail to the Xojo web application. Just wild guesses and probably not worth the effort…

Unfortunately, Xojo tries to do too much work for us with their WebFileUploader. I know they had to be hacky in many ways to make it work seemlessly, but that comes at some expense. For example, there’s still no way to have a single-file uploader (and there are plenty of cases where that’d be necessary). Still fighting with that all the time.

Some wishful thinking: method to call the select files dialog (along with some options like filetype restriction or single/multiple selection), an array of files ready to be uploaded and a method to trigger the upload. Displaying the files in the upload queue could easily be done by ourselves if we want to, same for removal.