Get file metadata

Gets metadata about the document file.

Parameters

The following parameters are in the computed field's global Method parameter:

keyvaluedescription
id (required)getFileMetadata
typefilename,
contentType
If you specify filename, outputs the document's filename without the file extension. Sensible gets the filename from the Document Name parameter if you extract through the Sensible API or SDKs, or assigns a document name on upload if you use the Sensible app.
If you specify contentType, outputs the document's MIME content type, for example, image/jpeg or application/pdf.

Examples

The following example shows extracting the filename from the example document.

Config

{
  "fields": [
    {
      "id": "doc_filename",
      "method": {
        "id": "getFileMetadata",
        "type": "filename"
      }
    }
  ]
}

Example document
The following image shows the example document used with this example config:

Click to enlarge

Example documentDownload link

Output

{
  "doc_filename": {
    "value": "utility_statement_gas_dec_2019",
    "type": "string"
  }
}