Field | Type | Description |
---|---|---|
name | string | The name of the file. |
data | bytes | The content of the file as bytes. |
type | string | The MIME type of the file. |
wf-file-change
event. Then, use the @{payload}
environment variable to access the file objects. The trigger will fire when a user adds or removes files from the file input block.@{result}
variable in the block that follows it in a blueprint.
Each file object has the following fields:
Field | Type | Description |
---|---|---|
id | string | The ID of the file. |
name | string | The name of the file. |
status | string | The status of the file. Can be in_progress , completed , or failed . |
created_at | string | The date and time the file was created. |
graph_ids | array | The IDs of any Knowledge Graphs that the file is associated with. |
in_progress
, the file is being processed and is not ready to be used in a workflow.
Some files are processed quickly, such as PDFs and images, and are ready to be used in a workflow within seconds. Others, such as Word documents, may take a few minutes to process.
There are a few ways you can handle files that are still being processed:
files
. After the UI Trigger fires, the Add files to Writer Cloud block uploads the files to Writer Cloud by accessing the @{files}
state variable.
@{files}
state variable looks like this:
[file_object]
, which the Add files to Writer Cloud block then accesses using @{result}
to upload the CSV file.
Name | Type | Control | Default | Description | Options | Validation |
---|---|---|---|---|---|---|
Files | Object | - | [] | A list of files to be uploaded to the Writer platform. You can use files uploaded via the File input component or specify dictionaries with data, type and name. | - | - |
Name | Field | Type | Description |
---|---|---|---|
Success | - | success | File successfully uploaded. |
Error | - | error | If the function raises an Exception. |
@{result}
variable in the block that follows it in a blueprint.