You are here

function _imagefield_crop_cropped_preview in Imagefield Crop 5

1 string reference to '_imagefield_crop_cropped_preview'
imagefield_crop_menu in ./imagefield_crop.module
TODO:

File

./imagefield_crop.module, line 42

Code

function _imagefield_crop_cropped_preview() {
  foreach ($_SESSION['imagefield'] as $fieldname => $files) {
    foreach ($files as $delta => $file) {
      if ($file['crop']['preview'] == $_GET['q']) {
        file_transfer($file['crop']['filepath'], array(
          'Content-Type: ' . mime_header_encode($file['filemime']),
          'Content-Length: ' . $file['filesize'],
        ));
        exit;
      }
    }
  }
}