You are here

function shrinktheweb_file_download in ShrinkTheWeb 7

Same name and namespace in other branches
  1. 8 shrinktheweb.module \shrinktheweb_file_download()

Implementation of hook_permission().

File

./shrinktheweb.module, line 413

Code

function shrinktheweb_file_download($uri) {
  if (preg_match('/^' . file_default_scheme() . ':\\/\\/' . variable_get('shrinktheweb_thumbs_folder', '') . '(.*?)\\.jpg$/si', $uri)) {
    $info = image_get_info($uri);
    return array(
      'Content-Type' => $info['mime_type'],
    );
  }
}