summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorpzy <pzy@d1sturbed.org>2014-05-19 19:53:27 +0200
committerLukas Reschke <lukas@owncloud.com>2014-08-15 09:17:35 +0200
commit5dd950bc0a23702f69a72439d3b2ffc9c5b8cbe8 (patch)
treea73e615e98aeebed4e84c1ec5186d91c6e781b93 /apps
parente3cf107e1df326cad4b31c1a103da9a593d79444 (diff)
downloadnextcloud-server-5dd950bc0a23702f69a72439d3b2ffc9c5b8cbe8.tar.gz
nextcloud-server-5dd950bc0a23702f69a72439d3b2ffc9c5b8cbe8.zip
Update public.php
added tag to make facebook load a preview picture Update public.php add check ifMimeSupported and put the thumbsize in a variable generate preview for all supported mimes
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/templates/public.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 8406b79cf1a..42103296d87 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -1,4 +1,9 @@
<?php /** @var $l OC_L10N */ ?>
+<?php $thumbSize=1024; ?>
+<?php if ( \OC\Preview::isMimeSupported($_['mimetype'])): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?>
+ <link rel="image_src" href="<?php p(OCP\Util::linkToRoute( 'core_ajax_public_preview', array('x' => $thumbSize, 'y' => $thumbSize, 'file' => $_['directory_path'], 't' => $_['dirToken']))); ?>" />
+<?php endif; ?>
+
<div id="notification-container">
<div id="notification" style="display: none;"></div>
</div>