WebFileUploader Filter Doesn't Work When Dragging Files?

Hi all,

When setting a filter in the Web2 Framework’s WebFileUploader via it’s “Filter” property, the filter is only respected in the shown file dialog (shown when the user clicks the control).

However, if files are dragged onto the WebFileUploader on a web page, any type of file is allowed.

Checking to see if this is known bug or a regression in a recent release. (I’m using Xojo 2024r1.1)

If an example is needed, the example WebFileUploader project included with Xojo displays this shortcoming. In the example screenshots below, I’m able to upload a text file if I drag it onto the WebFileUploader control, ignoring the filter entirely.

Screenshots of the WebFileUploader project from Xojo’s Examples:

  • Opening the example project in Xojo 2024r1.1:

  • The preset filter in the example project:

  • A text file (not allowed per the filter) added by dragging it onto the WebFileUploader control at runtime.

This ignoring of the filter when dragging files coupled with the inability to remove individual files from its “upload queue”** limits the utility of the Web2 WebFileUploader.

Anthony

** (a regression from the Web1 Framework which had a “WebFileUploader.RemoveFileAtIndex” class method)

More like it was designed this way for Web 2 and the design missed this filter.

Please open an Issue for @Ricardo_Cruz to add a way to limit the files we can accept using drag and drop. Thanks.

1 Like

Issue 76178 added:

https://tracker.xojo.com/xojoinc/xojo/-/issues/76178

Anthony

2 Likes