Merge branch 'fix-photo' into 'dev'
$data only contains the link to the image if the image is in os storage. The… See merge request hubzilla/core!1379
This commit is contained in:
commit
6013814cf4
@ -165,6 +165,7 @@ class Photo extends \Zotlabs\Web\Controller {
|
|||||||
|
|
||||||
if($exists && $allowed) {
|
if($exists && $allowed) {
|
||||||
$data = dbunescbin($e[0]['content']);
|
$data = dbunescbin($e[0]['content']);
|
||||||
|
$filesize = $e[0]['filesize'];
|
||||||
$mimetype = $e[0]['mimetype'];
|
$mimetype = $e[0]['mimetype'];
|
||||||
$modified = strtotime($e[0]['edited']);
|
$modified = strtotime($e[0]['edited']);
|
||||||
if(intval($e[0]['os_storage']))
|
if(intval($e[0]['os_storage']))
|
||||||
@ -261,7 +262,7 @@ class Photo extends \Zotlabs\Web\Controller {
|
|||||||
}
|
}
|
||||||
|
|
||||||
header("Last-Modified: " . gmdate("D, d M Y H:i:s", $modified) . " GMT");
|
header("Last-Modified: " . gmdate("D, d M Y H:i:s", $modified) . " GMT");
|
||||||
header("Content-Length: " . strlen($data));
|
header("Content-Length: " . $filesize);
|
||||||
|
|
||||||
// If it's a file resource, stream it.
|
// If it's a file resource, stream it.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user