* cache file read image.
This commit is contained in:
@@ -168,7 +168,8 @@ $(document).ready(function()
|
||||
var resizeCols = function() {
|
||||
var cellHeight = $(window).height() - $('#footer').outerHeight() - $('#header').outerHeight() - 42;
|
||||
$cols.children('.panel').height(cellHeight).css('maxHeight', cellHeight).find('.panel-body').css('position', 'absolute');
|
||||
$cols.find('.tab-content').height(cellHeight - $cols.find('.nav-tabs').height() - 35).css('maxHeight', cellHeight - $cols.find('.nav-tabs').height() - 35).css('overflow-y', 'auto');
|
||||
var sideHeight = cellHeight - $cols.find('.nav-tabs').height() - $cols.find('.side-footer').height() - 35;
|
||||
$cols.find('.tab-content').height(sideHeight).css('maxHeight', sideHeight).css('overflow-y', 'auto');
|
||||
};
|
||||
|
||||
$(window).on('resize', resizeCols);
|
||||
|
||||
@@ -502,6 +502,12 @@ class file extends control
|
||||
$mime = in_array($file->extension, $this->config->file->imageExtensions) ? "image/{$file->extension}" : $this->config->file->mimes['default'];
|
||||
header("Content-type: $mime");
|
||||
|
||||
$cacheMaxAge = $this->config->cookieLife - time();
|
||||
header("Cache-Control: private");
|
||||
header("Pragma: cache");
|
||||
header("Expires:" . gmdate("D, d M Y H:i:s", $this->config->cookieLife) . " GMT");
|
||||
header("Cache-Control: max-age=$cacheMaxAge");
|
||||
|
||||
$handle = fopen($file->realPath, "r");
|
||||
if($handle)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user