You are here

function bueditor_file_download in BUEditor 6.2

Implementation of hook_file_download().

File

./bueditor.module, line 89
Implements the necessary hooks for the editor to work properly.

Code

function bueditor_file_download($file) {
  if (strpos($file, variable_get('bueditor_sprites_dir', 'bueditor-sprites') . '/') === 0) {
    $path = file_create_path($file);
    return array(
      'Content-type: ' . file_get_mimetype($path),
      'Content-Length: ' . filesize($path),
    );
  }
}