Does anyone know how to clear the media library that is presented to the user upon media selection? Every image I've ever used on my site is showing up in there, even though I have disallowed all media formats except for video.

Thanks!
Tim

Comments

devin carlson’s picture

Status: Active » Fixed

The media library is actually a view and can be customized in the same manner as any other view.

You can customize the media library view at admin/structure/views/view/media_default/edit. To make the media library only display video media, edit the File: Type filter under FILTER CRITERIA and only check "video".

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

BarisW’s picture

Status: Closed (fixed) » Active

Sorry for re-opening, but I'm having some issues here as well.

- Exposed filters are not showing on the default view
- If I disable the default view "media_default" (and clone it to three separate views for each content type) the View Library tab is still working.

You can customize the media library view at admin/structure/views/view/media_default/edit. To make the media library only display video media, edit the File: Type filter under FILTER CRITERIA and only check "video".

What happens if you want a tab for Video, a tab for Images and a tab for Audio? Whatever I try, I cannot get this to work properly.

mpgeek’s picture

Status: Active » Fixed

@BarisW, with the latest version of Media 2.x, disabling the media browser veiw does in fact hide the "View Library" tab. BUt that's not likely what you want.

If you go to admin/structure/types/manage/[CONTENT_TYPE]/fields/field_[NAME], note the "enabled browser plugins" check boxes. THere you can alter what tabs are available in the media browser for the current content type. If you make a change do a cache clear for good measure, and editing media fields should show only the tabs/plugins you selected.

As to how to make multiple tabs, the intuitive thing to do is to clone and modify. But what works the easiest is to just go into in to edit the media_default view as Devin indicated (admin/structure/views/view/media_default/edit). Across the top of the page you should have tabs for "Media browser", "My Files", and "+Add". If you click the add tab, one of the choices for adding is "Media browser tab". Click that and edit the view for that tab, optionally filtering by file type, i.e. Video to only show video on that media browser tab.

Once you've made your various Media browser tabs in the Views UI, do another cache clear, and head back to your content type, and enable browser plugins you'd like to use by checking the appropriate boxes.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mastermirko’s picture

Sorry for opening it again, but in my case I can always see also files that are no longer present in the filesystem.

How is it possible to clean the cache of the library and to update it?

Thank you

Regards,