app:file:read
Retrieves file bytes without interpreting their format.
Options
| Name | Type | Description |
|---|---|---|
schema | string | Is the database that contains the file record. |
table | string | Is the table that contains the file record. |
record_id | string | Identifies the record that owns the file. |
field | string | Is the file field to read. |
Outputs
| Name | Type | Description |
|---|---|---|
filename | string | |
content_type | string | |
content_base64 | string | |
encoding | string | |
size | int64 |
Examples
name: Read a config file
actions:
- name: config
component: storage:local:file:read
vars:
path: ./config.json
outputs:
config: "{{ config.body | from:'json' }}"name: Read an uploaded file for document processing
actions:
- name: source
component: app:file:read
vars:
schema: content
table: files
record_id: "{{ var.file_id }}"
field: source
- name: selected
component: data:document:select
vars:
format: xml
content_base64: "{{ source.content_base64 }}"
locator: /resources/string
outputs:
filename: "{{ source.filename }}"
entries: "{{ selected.matches }}"