aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorM. Dent <dentm42@gmail.com>2018-11-08 11:25:36 +0100
committerM. Dent <dentm42@gmail.com>2018-11-08 11:25:36 +0100
commit6013814cf497c72646c80769a63689e423423bcd (patch)
tree0c8009a6566116d2d4bb74533a6eaeb51c764748
parent61deb4fcfdbb84411a568de6ffa41d1a3040fb4a (diff)
parente0a0570cc4409943d546ba114f5e9ba5e4aaa5d1 (diff)
downloadvolse-hubzilla-6013814cf497c72646c80769a63689e423423bcd.tar.gz
volse-hubzilla-6013814cf497c72646c80769a63689e423423bcd.tar.bz2
volse-hubzilla-6013814cf497c72646c80769a63689e423423bcd.zip
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
-rw-r--r--Zotlabs/Module/Photo.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 09c698b1a..de11b41c7 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -165,6 +165,7 @@ class Photo extends \Zotlabs\Web\Controller {
if($exists && $allowed) {
$data = dbunescbin($e[0]['content']);
+ $filesize = $e[0]['filesize'];
$mimetype = $e[0]['mimetype'];
$modified = strtotime($e[0]['edited']);
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("Content-Length: " . strlen($data));
+ header("Content-Length: " . $filesize);
// If it's a file resource, stream it.