Get file metadata
Gets metadata about the document file.
Parameters
The following parameters are in the computed field's global Method parameter:
| key | value | description |
|---|---|---|
| id (required) | getFileMetadata | |
| type | filename,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:

| Example document | Download link |
|---|
Output
{
"doc_filename": {
"value": "utility_statement_gas_dec_2019",
"type": "string"
}
}
Updated 26 days ago