U4-7727 - Pick only images from media

Created by Bjarne Fyrstenborg 13 Jan 2016, 23:35:44 Updated by Sebastiaan Janssen 17 Feb 2016, 15:41:19

It would be great if you can restrict the media picker to only images. The media picker property editor already has an option for that, but it is not configurable from the media picker datatype config.

1 Attachments

Comments

Bjarne Fyrstenborg 13 Jan 2016, 23:53:37

PR: https://github.com/umbraco/Umbraco-CMS/pull/1022

https://github.com/umbraco/Umbraco-CMS/commit/06a098215b37c2909a5be36197b7859cbdca3a5b


Claus Jensen 14 Jan 2016, 08:05:50

PR merged in and also pulled to v.7.4.0. Thanks @Bjarne.Fyrstenborg - nice addition :)


Bjarne Fyrstenborg 14 Jan 2016, 08:50:13

Great! Thanks @Claus.Jensen :) #h5yr


Kristof Lagae 15 Feb 2016, 23:04:28

This would indeed be a nice addition if it works. I can still pick other file types and save the document. (tested in latest version 7.4 - fresh install)


Bjarne Fyrstenborg 15 Feb 2016, 23:23:55

Kristof, please provide some more info about which other file types you are able to pick? These changes use the existing media picker, which has a "onlyImages" option, so the media picker only show media items like "jpg, gif, png" .. but not "pdf, zip" etc..


Bjarne Fyrstenborg 15 Feb 2016, 23:25:21

ahh okay, I see the issue now that I am able to pick file types like .pdf, .docx, .zip, .eps ..


Bjarne Fyrstenborg 15 Feb 2016, 23:32:22

Okay, the issue is that it doesn't set the onlyImages property anymore. Must have been a merge conflict or something like that.

These changes should be made: https://github.com/umbraco/Umbraco-CMS/commit/06a098215b37c2909a5be36197b7859cbdca3a5b

But in the recent source on github it doesn't use "onlyImages" in mediaPickerOverlay. https://github.com/umbraco/Umbraco-CMS/blob/cff6a74f16f52aa9506ec8402eae2a19b5ab5608/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js#L8

@claus can you fix this? :)


Kristof Lagae 16 Feb 2016, 18:54:08

Okay, nice to hear the cause is found.


Bjarne Fyrstenborg 17 Feb 2016, 00:05:32

@Shandem can this be scheduled for 7.4.1?

Seems it just is missing this part from my PR, e.g. added after "multiPicker: multiPicker" https://github.com/umbraco/Umbraco-CMS/blob/cff6a74f16f52aa9506ec8402eae2a19b5ab5608/src/Umbraco.Web.UI.Client/src/views/propertyeditors/mediapicker/mediapicker.controller.js#L65

onlyImages: onlyImages


Bjarne Fyrstenborg 17 Feb 2016, 06:26:43

Oh, and it should probably also be fixed in 7.3.8 as it was added to 7.3.7 as well.. So I think it might be an issue in 7.3.7 too..


Priority: Normal

Type: Feature (request)

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.4.0, 7.3.4

Due in version: 7.4.0

Sprint: Sprint 6

Story Points:

Cycle: