Skip to content

[Back to Parameters]

File

A widget that allows the user to select a file or folder on the local file system.

Key Type Required Default Description UPM/TD
accessMode enum:
read,
write, readwrite
✔ ➖ Indicates if this path represents a path that is a source, destination, or both.1 ✔2
validateExistence bool ✔ ➖ If true, the file or folder must already exist on the filesystem. ✔
itemsToSelect enum:
files,
folders, filegeodb,
esriLayers
✔ ➖ Specify what types of items the user can select. ✔
selectMultiple bool ✔ ➖ If true, the browser will allow selection of multiple files and the value will be saved as a list instead of a string. ✔
filters arr(obj) ❌ [] A list of objects for specifying file extension filters. If empty, all extensions will be selectable. ✔
includeWebBrowser bool ❌ false If true, show an option to browse web-based filesystems. ❌
allowURL bool ❌ false If true, a URL is a valid replacement for a local path.
⚠ Warning: this will disable all path validation.
✔

Deprecated

Key Type Required Default Description
separate bool ❌ false If true, allows users to specify a destination filename and optionally a suffix to append to the dataset.3

filters

Key Type Required Default Description UPM/TD
filter arr(str) ✔ ➖ A list of filter strings in *.extension form. ✔
description str ✔ ➖ The description of the filter. ✔

Example

{
  "name": "somefile",
  "type": "file",
  "valueType": "stringEncodedParts",
  "prompt": "Files to Read",
  "accessMode": "read",
  "validateExistence": true,
  "itemsToSelect": "files",
  "selectMultiple": true,
  "filters": [
    {
      "filter": [
        "*.xls",
        "*.xlsx"
      ],
      "description": "Microsoft Excel Files"
    },
    {
      "filter": [
        "*.csv"
      ],
      "description": "CSV Files"
    }
  ],
  "includeWebBrowser": true,
  "allowURL": false
}

  1. This information is used to determine things like which file paths need updating when uploading to FME Server or which files need to be included in a workspace template. 

  2. readwrite is currently unsupported. 

  3. Used in FME Quick Translator to translate multiple source datasets into separate destination datasets.