diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-11-17 09:14:16 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-11-17 09:14:16 +0100 |
commit | becd5f1446dd837e006f31d3befb611c20445d8d (patch) | |
tree | be7211a665c3b645e41f915baf23bbc211c9a0ee /Zotlabs/Storage | |
parent | 3f2b7d756c2bcffef675770d28d5b65b380fc8f5 (diff) | |
parent | ab363e31322d699ee53f052d5198c3a7680f8cc8 (diff) | |
download | volse-hubzilla-becd5f1446dd837e006f31d3befb611c20445d8d.tar.gz volse-hubzilla-becd5f1446dd837e006f31d3befb611c20445d8d.tar.bz2 volse-hubzilla-becd5f1446dd837e006f31d3befb611c20445d8d.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Storage')
-rw-r--r-- | Zotlabs/Storage/Browser.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Zotlabs/Storage/Browser.php b/Zotlabs/Storage/Browser.php index b5440aacf..ee5a9fef4 100644 --- a/Zotlabs/Storage/Browser.php +++ b/Zotlabs/Storage/Browser.php @@ -197,6 +197,11 @@ class Browser extends DAV\Browser\Plugin { } } + + // generate preview icons for tile view. + // Currently we only handle images, but this could potentially be extended with plugins + // to provide document and video thumbnails + $photo_icon = ''; if(strpos($type,'image/') === 0 && $attachHash) { @@ -206,8 +211,12 @@ class Browser extends DAV\Browser\Plugin { intval(PHOTO_RES_PROFILE_80) ); if($r) { - $photo_icon = $r[0]['resource_id'] . '-' . $r[0]['imgscale']; + $photo_icon = 'photo/' . $r[0]['resource_id'] . '-' . $r[0]['imgscale']; } + if($type === 'image/svg+xml') { + $photo_icon = $fullPath; + } + } $attachIcon = ""; // "<a href=\"attach/".$attachHash."\" title=\"".$displayName."\"><i class=\"fa fa-arrow-circle-o-down\"></i></a>"; |