The bug is very simple...
On media finder is we don't select anything and try to add, there are some message that inform us that we have nothing selected, but there are n controll when we acidentally try to add a folder:

After adding:

I was able to replicate this: folders can be selected via Media Finder.
Expectation: Folders should not be selectable via Media Finder's prompt, the Insert button should not allow the user to proceed with selecting a folder or having nothing selected.
@daftspunk Can we have a mode of the Media Finder to allow only selection of folders? I've got a setting that I want to implement for a plugin that wants the user to select a folder, currently I do it in a text field with $MEDIA used to represent the media library path, but I'd much rather have a mode: folder on the MediaFinder widget so that I could get them to select only a folder.
@daftspunk it's possible to make auto-selection of last uploaded image? it's very pratical when we have big list of files
@dunets I think that falls into the category of too magical / use case specific for us to add in to core. If you wanted you could dig into the code yourself and see if there's a way that you could do that through your own JS that would extend the mediafinder, but that would be up to you and probably wouldn't get merged into core.
@LukeTowers, sounds reasonable. Perhaps selectionType: file or selectionType: folder could be implemented. A Pull Request for this would be accepted.
After thinking about this for a while, I've come up with the following idea for a solution, which involves a slight revamp which both fixes this issue and improves the overall UX of the MediaManager and MediaFinder widgets.
Ideal Implementation:
The mediafinder formwidget now accepts the following values for mode: everything|file|folder|image|audio|video|document. Each mode will be rendered by its own partial so that we could support having audio and video previews as well image previews.
Each of the modes are explained below:
everything: The default mode, behaviour as it exists currently. Nothing is filtered, anything can be selected. Crop and insert button disabled. Rendered as current file mode.folder: Only folders are displayed and can be selected. The sidebar filter list is removed. Rendered same as current file mode.file: Nothing is filtered, only files can be selected. Ideally, "Folder" is removed from the sidebar filter list but everything else remains. Rendered as current file mode.document: Only documents (and folders for navigation) are displayed and can be selected. The sidebar filter list is removed. Rendered same as current file mode.image: Only images (and folders for navigation) are displayed and can be selected. The sidebar filter list is removed. Rendered as current image mode.audio: Only audio files (and folders for navigation) are displayed and can be selected. The sidebar filter list is removed. Rendered as a new partial that provides a HTML5 audio element.video: Only video (and folders for navigation) are displayed and can be selected. The sidebar filter list is removed. Rendered as a new partial that provides a HTML5 video element.This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.
This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see action on it, please respond and we will get the ball rolling.
This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days.
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.
This issue will be closed and archived in 3 days, as there has been no activity in the last 30 days.
changing label to shut up the bot, this will be dealt with whenever someone submits a PR or I get around to the larger media manager improvements.
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days.
If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue.
If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.
Most helpful comment
After thinking about this for a while, I've come up with the following idea for a solution, which involves a slight revamp which both fixes this issue and improves the overall UX of the MediaManager and MediaFinder widgets.
Ideal Implementation:
The mediafinder formwidget now accepts the following values for
mode:everything|file|folder|image|audio|video|document. Each mode will be rendered by its own partial so that we could support having audio and video previews as well image previews.Each of the modes are explained below:
everything: The default mode, behaviour as it exists currently. Nothing is filtered, anything can be selected. Crop and insert button disabled. Rendered as currentfilemode.folder: Only folders are displayed and can be selected. The sidebar filter list is removed. Rendered same as currentfilemode.file: Nothing is filtered, only files can be selected. Ideally, "Folder" is removed from the sidebar filter list but everything else remains. Rendered as currentfilemode.document: Only documents (and folders for navigation) are displayed and can be selected. The sidebar filter list is removed. Rendered same as currentfilemode.image: Only images (and folders for navigation) are displayed and can be selected. The sidebar filter list is removed. Rendered as currentimagemode.audio: Only audio files (and folders for navigation) are displayed and can be selected. The sidebar filter list is removed. Rendered as a new partial that provides a HTML5 audio element.video: Only video (and folders for navigation) are displayed and can be selected. The sidebar filter list is removed. Rendered as a new partial that provides a HTML5 video element.