---
title: "document-is-file"
description: "Optimize your web app's document handling with the 'document-is-file' evaluator for file-specific actions. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/developers/ui-dev/evaluators/document-is-file"
---

# document-is-file

If the document is a file (as opposed to a folder).

```
{
    "evaluator": "document-is-file"
}
```

## Example

This block, taken from the [Configuration](/documentation/gitana/4.0/developers/ui-dev/configuration.md) docs, adds a `custom-preview-in-website` document action. If the user were looking at a file, this block would be included since it has a `document-is-file` evaluator.

```
{
    "evaluator": "document-is-file",
    "config": {
        "document-actions": [{
            "id": "custom-preview-in-website"
        }]
    }
}
```

## See also

- [Configuration](/documentation/gitana/4.0/developers/ui-dev/configuration.md)
- [document-is-folder](/documentation/gitana/4.0/developers/ui-dev/evaluators/document-is-folder.md)
- [and](/documentation/gitana/4.0/developers/ui-dev/evaluators/and.md)
