To enable this also for the video upload field (video module) replace the local function which returns the widgets array with the official filefield_sources_widgets hook in the .module file:

/**
 * Implements hook_filefield_sources_widgets().
 *
 * This returns a list of widgets that are compatible with FileField Sources.
 */
function imce_filefield_filefield_sources_widgets() {
  return array('file_generic', 'image_image');
}

Also replace the function call at line 40 and 54 with the invoke hook method:
module_invoke_all('filefield_sources_widgets')

This will enable the checkbox also for the video upload field.

Comments

zach.bimson’s picture

Worked perfectly, could this be pushed into the next release?

kressin’s picture

Worked great with public files but once I switched to private file system it no longer responds. Any ideas?

Sorry it works great with private files too. The problem was caused by another module. Great code!

chichilatte’s picture

For 6.x-1.x-dev version (datestamp 1348533558) I had to make one tiny change to imce_filefield.module. I changed the line...

     $widgets = array('filefield_widget', 'imagefield_widget');

to...

     $widgets = array('filefield_widget', 'imagefield_widget', 'uploadfield_widget');
ufku’s picture

Status: Active » Fixed

You can now implement hook_imce_filefield_supported_widgets_alter() in your custom module.

/**
 * Implements hook_imce_filefield_supported_widgets_alter().
 */
function MYMODULE_imce_filefield_supported_widgets_alter(&$widgets) {
  $widgets[] = 'xmodule_widget';
}

Status: Fixed » Closed (fixed)

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