. * */ require_once('../../../lib/base.php'); OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('gallery'); $img = $_GET['img']; $image = OC_Gallery_Photo::getThumbnail($img); if ($image) { $offset = 3600 * 24; // 24 hour // calc the string in GMT not localtime and add the offset header("Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT"); header('Cache-Control: max-age='.$offset.', must-revalidate'); header('Pragma: public'); $image->show(); }