Our /file/virusscan Robot

Scan files for viruses

🤖/file/virusscan rejects millions of trojans, viruses, malware & other malicious threats before they reach your platform.

This Robot is built on top of ClamAV, the best open source antivirus engine available. We update its signatures on a daily basis.

By default, this Robot excludes all malicious files from further processing without any additional notification. This behavior can be changed by setting error_on_decline to true, which will stop Assemblies as soon as malicious files are found. Such Assemblies will then be marked with an error.

We allow the use of industry standard EICAR files for integration testing without needing to use potentially dangerous live virus samples.

Usage example

Scan uploaded files and throw an error if a malicious file is detected:

{
  "steps": {
    "scanned": {
      "robot": "/file/virusscan",
      "use": ":original",
      "error_on_decline": true,
      "error_msg": "At least one of the uploaded files is malicious and was declined"
    }
  }
}

Parameters

  • use

    String / Array of Strings / Object required

    Specifies which Step(s) to use as input.

    • You can pick any names for Steps except ":original" (reserved for user uploads handled by Transloadit)

    • You can provide several Steps as input with arrays:

      "use": [
        ":original",
        "encoded",
        "resized"
      ]
      

    💡 That’s likely all you need to know about use, but you can view Advanced use cases.

  • error_on_decline

    Boolean ⋅ default: false

    If this is set to true and one or more files are declined, the Assembly will be stopped and marked with an error.

  • error_msg

    String ⋅ default: "One of your files was declined"

    The error message shown to your users (such as by Uppy) when a file is declined and error_on_decline is set to true.

Demos

Related blog posts