use ViewOnline instead of Download for preview

This commit is contained in:
Uwe Steinmann 2017-06-20 09:14:45 +02:00
parent d2da3004bb
commit 23c53d112d

View File

@ -351,20 +351,20 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
$this->contentHeading(getMLText("preview"));
?>
<audio controls style="width: 100%;">
<source src="../op/op.Download.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" type="audio/mpeg">
<source src="../op/op.ViewOnline.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" type="audio/mpeg">
</audio>
<?php
break;
case 'application/pdf':
$this->contentHeading(getMLText("preview"));
?>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.Download.php?documentid='.$document->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<iframe src="../pdfviewer/web/viewer.html?file=<?php echo urlencode('../../op/op.ViewOnline.php?documentid='.$document->getID().'&version='.$latestContent->getVersion()); ?>" width="100%" height="700px"></iframe>
<?php
break;
case 'image/svg+xml':
$this->contentHeading(getMLText("preview"));
?>
<img src="../op/op.Download.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" width="100%">
<img src="../op/op.ViewOnline.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" width="100%">
<?php
break;
default: