Safe for Work

Detecting whether or not the uploaded file is safe for work.

Overview

Safe for Work (SFW) is one of the intelligence services of Filestack platform. This feature shows you whether the uploaded file contains any unsafe content or it is safe for your business.

Task Configuration

In order to learn how you can use Workflows UI to configure tasks and logic items, please visit Creating Workflows Tutorial.

Safe for Work task is available in Intelligence tasks category.

Parameters

Task Name string Unique name of the task which will be included in the webhook response and can be used to build logic below.

Logic

Safe for Work task returns following response to the workflow:

{
  "data": {
    "sfw": false
  }
}

or

{
  "data": {
    "sfw": true
  }
}

Parameters

sfw boolean Indicates whether the file is safe for work or not.

Considering the response from the task, you can build logic in order to make independent flows with different executing tasks. For example, if you would like to run another task if the file is not safe, you can use following rule:

sfw eq false or sfw neq true

In Workflows UI this command would be similar to the example below:

Visit Creating Workflows Tutorial to learn how you can use Workflows UI to configure your tasks and logic between them.

Webhook

Below you can find an example webhook payload for a safe for work task

  • uploaded file is safe:
{
    "id": 65374400,
    "action": "fs.workflow",
    "timestamp": 1551126123,
    "text": {
        "workflow": "c516519f-3755-4fb5-85a4-15ae4b31d475",
        "createdAt": "2019-02-25T20:21:53.929686708Z",
        "updatedAt": "2019-02-25T20:21:56.716186556Z",
        "sources": [
            "H2swKXwhRxKFrylkjGcz"
        ],
        "results": {
            "sfw_1551120182170": {
                "data": {
                    "sfw": true
                }
            }
        },
        "status": "Finished"
    }
}
  • uploaded file is NOT safe:
{
    "id": 65374401,
    "action": "fs.workflow",
    "timestamp": 1551126197,
    "text": {
        "workflow": "c516519f-3755-4fb5-85a4-15ae4b31d475",
        "createdAt": "2019-02-25T20:21:53.929686791Z",
        "updatedAt": "2019-02-25T20:21:56.716186597Z",
        "sources": [
            "H2swKXwhRxKFrylakLwcd"
        ],
        "results": {
            "sfw_1551120182170": {
                "data": {
                    "sfw": false
                }
            }
        },
        "status": "Finished"
    }
}

Please visit the webhooks documentation page to learn more.