# AttachmentPreview

# Manual

# Installation

#### Prerequisites

In order for this module to work, following requirements must be met:

1. Additional external packagess are installed on the OTRS server: 
    - libreoffice
    - libreoffice-java-common
    - default-jre
2. Apache user must be the owner of the /var/www. LibreOffice requires ".config" directory in user's (in this case it's Apache) home directory. Commands below are examples for Ubuntu.

```
sudo chown -R www-data /var/www/
sudo service apache2 restart
```

The following instructions explain how to install the package using one of the provided methods.

#### 1. Admin Interface

Log in to your system as user with admin privileges and go to menu Admin ⇨ Package Manager. Select module file (with .opm extension) in the "Actions" panel and click "Install Package" button.

#### 2. Command line

Log in to the server (via SSH, putty etc.) as "otrs" user and use the following command:

```shell
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install /path/to/package/AttachmentPreview-1.0.4.opm
```

# Usage

After the installation, every article attachment is displayed inline as seen below.

[![image-1587476699531.png](https://docs.intalioservices.com/uploads/images/gallery/2020-04/scaled-1680-/0NP0ucEkHQmdSQpJ-image-1587476699531.png)](https://docs.intalioservices.com/uploads/images/gallery/2020-04/0NP0ucEkHQmdSQpJ-image-1587476699531.png)

# Introduction and Description

**Attachment preview** is the module allowing user to preview given attachments in the tickets without the need to download it. The module doesn't require additional configuration so, after installation, it's ready to use.

<p class="callout info">Supporting the most popular formats: jpeg, pdf, jpg, png, docx, csv, xls, xlsx, </p>

[![attachement_preview_with_title.png](https://docs.intalioservices.com/uploads/images/gallery/2020-06/scaled-1680-/MQX7CGynHlrNRESO-attachement_preview_with_title.png)](https://docs.intalioservices.com/uploads/images/gallery/2020-06/MQX7CGynHlrNRESO-attachement_preview_with_title.png)