Skip to content

Commit

Permalink
Add support for PDF 'image'
Browse files Browse the repository at this point in the history
If the file is a PDF, there is an <img> tag shown but that is not possible for the PDF src
  • Loading branch information
AIC-BV authored Oct 12, 2023
1 parent 751545f commit 65226f0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ class="field-fileupload style-image-multi is-sortable is-multi <?= count($fileLi
<?php foreach ($fileList as $file): ?>
<div class="upload-object is-success" data-id="<?= $file->id ?>" data-path="<?= $file->pathUrl ?>">
<div class="icon-container image">
<img src="<?= $file->thumbUrl ?>" alt="" />
<?php if ($file->extension !== "pdf"): ?>
<img src="<?= $file->thumbUrl ?>" alt=""/>
<?php else: ?>
<i class="icon-file-pdf"></i>
<?php endif ?>
</div>
<div class="info">
<h4 class="filename">
Expand Down

0 comments on commit 65226f0

Please sign in to comment.