diff options
author | Piotr Filiciak <piotr@filiciak.pl> | 2016-04-29 12:22:26 +0200 |
---|---|---|
committer | Piotr Filiciak <piotr@filiciak.pl> | 2016-05-15 15:41:02 +0200 |
commit | 53437ecced06c5dcff0c2b62b915b6bbf716bccb (patch) | |
tree | c55627e0d82bf70a583aaf9e5b5fe17122df4670 /apps/files_sharing/templates | |
parent | 7c28f62e20d7864f1fd71bca8b69adf0c01540b8 (diff) | |
download | nextcloud-server-53437ecced06c5dcff0c2b62b915b6bbf716bccb.tar.gz nextcloud-server-53437ecced06c5dcff0c2b62b915b6bbf716bccb.zip |
Fix: Bugs in shared link with video #24331
Diffstat (limited to 'apps/files_sharing/templates')
-rw-r--r-- | apps/files_sharing/templates/public.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index cb7fe1103b5..fb29382bdee 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -21,11 +21,13 @@ OCP\Util::addScript('files', 'files'); OCP\Util::addScript('files', 'filelist'); OCP\Util::addscript('files', 'keyboardshortcuts'); -$thumbSize = 1024; +$sysConfig = \OC::$server->getConfig(); +$thumbSizeX = $sysConfig->getSystemValue('preview_max_x', 1024); +$thumbSizeY = $sysConfig->getSystemValue('preview_max_y', 1024); ?> <?php if ($_['previewSupported']): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?> - <link rel="image_src" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute( 'core_ajax_public_preview', array('x' => $thumbSize, 'y' => $thumbSize, 'file' => $_['directory_path'], 't' => $_['dirToken']))); ?>" /> + <link rel="image_src" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute( 'core_ajax_public_preview', array('x' => $thumbSizeX, 'y' => $thumbSizeY, 'file' => $_['directory_path'], 't' => $_['dirToken']))); ?>" /> <?php endif; ?> <div id="notification-container"> @@ -94,7 +96,7 @@ $thumbSize = 1024; <?php else: ?> <?php if ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'video'): ?> <div id="imgframe"> - <video tabindex="0" controls="" preload="none"> + <video tabindex="0" controls="" preload="none" style="max-width: <?php echo p($thumbSizeX); ?>px; max-height: <?php p($thumbSizeY); ?>px"> <source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" /> </video> </div> |