I want to remove upload tab from media browser window and want to show only two tabs(web, library) on it.
And how can set the default selected tab for browser window.

Comments

ephy’s picture

Hi,
you have to create a module and add function
function MODULENAME_media_browser_plugins_alter(&$plugins)
{
unset($plugins['upload']);
}

poorva’s picture

Perfect solution !!! It really works for me.
Thanks ephy :) :) You have saved my time :)

mahendrakalal’s picture

Thanks, it is working great.... :)

rameshbabu.g’s picture

Hi ephy,

The code is working fine Thank you.,But here is there any option to disable it from Media Configuration.Actually I want to give option to client disable it.Disable upload functionality of vidoes for the initial start of the site like that after that client will enable it.
For that
1. Checked permissions:
Actually I checked the permissions for Media module.There I found a option like "Import media files from the local filesystem - unchecked it for all roles."

2. Checked content type Media field settings:
Allowed URI schemes : Public (Unchecked it)

But no luck..

Thanks,
Ramesh Babu G.

r@mmi

dotpex’s picture

Alter media configurations form and add checkbox "Disable upload tab"
Save it: variable_set('disable_media_upload', $form_state['values']['your_checkbox'])
And change function from above

function MODULENAME_media_browser_plugins_alter(&$plugins) {
 if (variable_get('disable_media_upload', 0)) {
  unset($plugins['upload']);
 }
}