]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update public.php
authorpzy <pzy@d1sturbed.org>
Mon, 19 May 2014 17:53:27 +0000 (19:53 +0200)
committerLukas Reschke <lukas@owncloud.com>
Fri, 15 Aug 2014 07:17:35 +0000 (09:17 +0200)
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

apps/files_sharing/templates/public.php

index 8406b79cf1a275631c0ae89f404509905ba167b9..42103296d87421ecb1fa7095ad91ae28d91fba29 100644 (file)
@@ -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>