You are here

function brightcove_media_file_presave in Brightcove Video Connect 7.4

Implements hook_media_file_presave().

File

brightcove_media/brightcove_media.module, line 972
This module provide the hook implementations for the integration with Media module.

Code

function brightcove_media_file_presave($file) {
  if (strpos($file->filemime, 'brightcove') && $file->filename == basename($file->uri)) {
    $bc_file = brightcove_video_load($file->filename);
    $file->filename = $bc_file->name;
  }
}