wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.4k stars 1.23k forks source link

how to open a directory and file dialogbox #2451

Open zundaren opened 1 year ago

zundaren commented 1 year ago

Is your feature request related to a problem? Please describe.

Open a dialog box to select files and directories both

Describe the solution you'd like

upload multiple selection files and directorys is very useful

Describe alternatives you've considered

No response

Additional context

No response

leaanthony commented 1 year ago

If it's possible we will support this in v3

mooijtech commented 1 year ago

It is not possible to select files and directories. The only way to select both files and directories is by providing two separate input elements.

References: https://stackoverflow.com/questions/3170962/enable-gtkfilechooserdialog-to-select-files-or-folders

acastruc commented 6 months ago

I cant speak to wails v3, but v2 doesnt support it out of the box. It's not hard to implement however, mac: smallest tweak to wailsv2 would expose this functionality, it's so close to already providing this. win: requires more work. see https://github.com/microsoft/Windows-classic-samples/tree/main/Samples/Win7Samples/winui/shell/appplatform/CommonFileDialogModes linux: out of the box, you can multiselect in "Recent" tab using wails v2. It's not hard to add code to make it work in all tabs FYI