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
This commit is contained in:
pzy 2014-05-19 19:53:27 +02:00 committed by Morris Jobke
parent a72dae6842
commit dc15633111
1 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,9 @@
<?php /** @var $l OC_L10N */ ?> <?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-container">
<div id="notification" style="display: none;"></div> <div id="notification" style="display: none;"></div>
</div> </div>