cernbox / file-picker-wrapper

OwnCloud File Picker wrapped in a web to be used in an iframe
0 stars 1 forks source link

Add ability to select a folder instead of just a file #1

Open javfg opened 1 year ago

javfg commented 1 year ago

Currently, the File-picker only allows to pick one or multiple files. It would be desirable to be able to pick folders instead.

To implement this, first some decisions have to be made:

Then, some changes will have to be added to the OwnCloud File-picker code to change the current functionality, which is entering into a folder when clicking it. Folders should show the checkbox for selection, like files, and navigation would have to be done in another way (perhaps showing a 'go inside' button when hovering over a folder?).

After that, the File-picker-wrapper has to be modified:

avivace commented 1 year ago

Can the user pick both files and folders or only one type based on a flag

I would say we start from 2 different "modes". File-picking or folder-picking. A query param like mode can be used to switch between two behaviours. It would still be interesting, as a future interaction, to try to experiment with a "mixed" approach (so able to select both).

If the folder-picking is exclusive, can multiple folders be picked?

Let's start with only one folder selectable.

Both of this also depends on what the backend returns (e.g. if it returns a single link for multiple folders and files selected it may be okay to just allow a mixed approach).

About the navigation: this needs to be checked in the code, but if possible we could just start having checkboxes on folders and leave the "click on folder" as navigation.

javfg commented 1 year ago

A query param like mode can be used to switch between two behaviours.

I'd recommend a folderPicker flag that if present, alters the default from regular file picking. This follows the nomenclature already there (like locationPicker)