Skip to content

Installation

The Adonis Attachment package is available on npm.

It's required Adonis Drive, please look at the documentation if this is not installed.

You can install it using the following ace command to automagically configure it:

sh
node ace add @jrmc/adonis-attachment

Alternatively, you can install it manually using your favorite package manager and running the configure command:

sh
npm install @jrmc/adonis-attachment
node ace configure @jrmc/adonis-attachment
sh
pnpm install @jrmc/adonis-attachment
node ace configure @jrmc/adonis-attachment
sh
yarn add @jrmc/adonis-attachment
node ace configure @jrmc/adonis-attachment

Additional install

Variants images are generates by sharp module and require installation:

sh
npm install sharp
sh
pnpm install sharp
sh
yarn add sharp

Variants images for thumbnail PDF are generates by node-poppler. Make sure you have poppler(pdftocairo) installed on your system.

It is possible to specify the path of binaries. Useful if your installations are specific or if you are dropping off precompiled versions.

Installation required:

sh
npm install node-poppler
sh
pnpm install node-poppler
sh
yarn add node-poppler

Variants images for thumbnail Document are generates by libreoffice-file-converter. Make sure you have LibreOffice installed on your system.

It is possible to specify the path of binaries. Useful if your installations are specific or if you are dropping off precompiled versions.

Installation required:

sh
npm install libreoffice-file-converter
sh
pnpm install libreoffice-file-converter
sh
yarn add libreoffice-file-converter

Variants images for thumbnail video are generates by fluent-ffmpeg. Make sure you have ffmpeg installed on your system (including all necessary encoding libraries like libmp3lame or libx264).

It is possible to specify the path of binaries. Useful if your installations are specific or if you are dropping off precompiled versions.

Installation required:

sh
npm install fluent-ffmpeg
sh
pnpm install fluent-ffmpeg
sh
yarn add fluent-ffmpeg