Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
hide download button for public preview of audio files
When the option to hide downloads was selected at public link creation, the download button can be hidden by the audio html attribute controlsList="nodownload"

Signed-off-by: Florian Storz <[email protected]>
  • Loading branch information
fstorz committed Jul 19, 2021
commit 2b6ff55fa96a0dd1a549f14bf148fdacf1288025
3 changes: 2 additions & 1 deletion apps/files_sharing/templates/public.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
<?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">
<audio tabindex="0" controls="" preload="none" style="width: 100%; max-width: <?php p($_['previewMaxX']); ?>px; max-height: <?php p($_['previewMaxY']); ?>px"
<?php if ($_['hideDownload']) { ?>controlsList="nodownload" <?php } ?>>
<source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
</audio>
</div>
Expand Down