Vesion 1.10If I put an image inside the text, or the user sends an email with the image inline in the text, it is shown inline. Fine.If the image is an attachment, wheter the message is created by api, by agent, or by customer email, it is only shown as {paperclip} imagename as link, filesize, no image.If I click on the link, the browser just offers to download it, not view it.I'd like to se a preview, and be able to see it in full size,

Please help us to help you by reading and following the posting guidelines located in this thread: Please read before requesting assistance.  The more information you give us the better we will be able to assist you. Thank you.No osTicket version.No mock up.No errors specified.

The version is clearly stated: Version 1The wish is clearly explained;,However, After writing this; I managed to edit the ./include/staff/templates/thread-entry.tmpl.php to show the image, without any styling:        <span class="attachment-info">        <i class="icon-paperclip icon-flip-horizontal"></i>        <a class="no-pjax truncate filename" href="<?php echo $A->file->getDownloadUrl();            ?>" download="<?php echo Format:($A->getFilename()); ?>"            target="_blank"><?php echo Format:($A->getFilename());        ?></a><?php echo $size;?><!-- My addition -->        <?php $attachment_type=explode("/",$A->file->type,2);        if ($attachment_type=="image") {        ?>        <img src='<?php echo $A->file->getDownloadUrl(); ?>'>        <?php        }        ?><!-- End addition -->        </span>There is no error message.

3.png

I tried to attach a file to the previous entry, but I can't see it. I'll try again.

3.png

4 years later

SOLVED for V1.14.1

Add below code at Line # 113 on include/staff/templates/thread-entry.tmpl.php

<?php
$attachment_type=explode("/",$A->file->type)[0];
echo $attachment_type;
if ($attachment_type == 'image'){
echo "<img src='".$A->file->getDownloadUrl(['id' => $A->getId()])."'>";
}
?>

This shows the attachment as inline image in the thread.

Write a Reply...