aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/templates/public.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/templates/public.php')
-rw-r--r--apps/files_sharing/templates/public.php38
1 files changed, 14 insertions, 24 deletions
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 7e6289784ae..13e4366c1c1 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -60,31 +60,21 @@ $maxUploadFilesize = min($upload_max_filesize, $post_max_size);
<?php if (isset($_['folder'])): ?>
<?php print_unescaped($_['folder']); ?>
<?php else: ?>
- <?php if ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'audio'): ?>
- <div id="imgframe">
- <audio tabindex="0" controls="" preload="none" style="width: 100%; max-width: <?php p($_['previewMaxX']); ?>px; max-height: <?php p($_['previewMaxY']); ?>px"
- <?php // See https://github.com/nextcloud/server/pull/27674?>
- <?php if ($_['hideDownload']) { ?>controlsList="nodownload" <?php } ?>>
- <source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
- </audio>
- </div>
- <?php else: ?>
- <!-- Preview frame is filled via JS to support SVG images for modern browsers -->
- <div id="imgframe"></div>
- <?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?>
- <div class="directDownload">
- <div>
- <?php p($_['filename'])?> (<?php p($_['fileSize']) ?>)
- </div>
- <?php if (!$_['hideDownload']) { ?>
- <a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
- <span class="icon icon-download"></span>
- <?php p($l->t('Download'))?>
- </a>
- <?php } ?>
- </div>
+ <!-- preview frame to open file in with viewer -->
+ <div id="imgframe"></div>
+ <?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?>
+ <div class="directDownload">
+ <div>
+ <?php p($_['filename'])?> (<?php p($_['fileSize']) ?>)
+ </div>
+ <?php if (!$_['hideDownload']) { ?>
+ <a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
+ <span class="icon icon-download"></span>
+ <?php p($l->t('Download'))?>
+ </a>
<?php } ?>
- <?php endif; ?>
+ </div>
+ <?php } ?>
<?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?>
<div class="directDownload">
<div>