Virusscanner for Directus
How to use the TTA virusscanner in Directus.

The settings can be configured by going to the TTA settings within Directus.
You have the following options:
- Automatic scanning, once enabled all files will be scanned automaticly.
- Mode, delete threats immediately or use a custom flow to handle the virus.
- Flow, the flow that will be triggered once the virusscanner has detected a virus. The flow type must always be a webhook with the POST method.
- Folders, files are only scanned when they are uploaded into a folder that you've enabled for scanning.
Using virusscanning in your own Directus extension
const result = await globalThis.TTA.virusscanAsset(
fileID
);Output
When the file has no virus:{
"isInfected": false,
"viruses": [],
"timeout": false
} When the file has a virus: {
"isInfected": true,
"viruses": [
"Eicar-Signature"
],
"timeout": false
}