uipath-cli
latest
false
重要 :
请注意,此内容已使用机器翻译进行了本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath CLI 用户指南
uip df files管理存储在记录文件字段中的 Blob 附件。所有三个动词都采用相同的三个位置参数,即实体 ID、记录 ID 和字段名称(区分大小写)。字段名称可以通过uip df entities get发现。
大纲
uip df files <verb> [options]
uip df files <verb> [options]
动词
| 动词 | 用途 |
|---|---|
upload | 上传文件至记录字段。 |
download | 下载附加到记录字段的文件。 |
delete | 删除附加到记录字段的文件。 |
uip df 文件上传
上传文件至记录字段。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<entity-id> | 是 | 实体 ID (UUID)。 |
<record-id> | 是 | 记录 ID (UUID)。 |
<field-name> | 是 | 文件字段的名称 (区分大小写)。 |
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
-f | --file | 路径 | 必填 | 要上传的文件的路径。 |
示例
uip df files upload a1b2c3d4-0000-0000-0000-000000000001 \
b2c3d4e5-0000-0000-0000-000000000001 invoice \
--file ./invoice.pdf
uip df files upload a1b2c3d4-0000-0000-0000-000000000001 \
b2c3d4e5-0000-0000-0000-000000000001 invoice \
--file ./invoice.pdf
数据形状(--输出 json)
{
"Code": "FileUploaded",
"Data": {
"EntityId": "a1b2c3d4-0000-0000-0000-000000000001",
"RecordId": "b2c3d4e5-0000-0000-0000-000000000001",
"FieldName": "invoice",
"FileName": "invoice.pdf"
}
}
{
"Code": "FileUploaded",
"Data": {
"EntityId": "a1b2c3d4-0000-0000-0000-000000000001",
"RecordId": "b2c3d4e5-0000-0000-0000-000000000001",
"FieldName": "invoice",
"FileName": "invoice.pdf"
}
}
uip df 文件下载
下载附加到记录字段的文件。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<entity-id> | 是 | 实体 ID (UUID)。 |
<record-id> | 是 | 记录 ID (UUID)。 |
<field-name> | 是 | 文件字段的名称 (区分大小写)。 |
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
| — | --destination | 路径 | <record-id>_<field-name>.bin | 输出文件路径。 |
示例
uip df files download a1b2c3d4-0000-0000-0000-000000000001 \
b2c3d4e5-0000-0000-0000-000000000001 invoice \
--destination ./invoice.pdf
# Default destination
uip df files download a1b2c3d4-0000-0000-0000-000000000001 \
b2c3d4e5-0000-0000-0000-000000000001 invoice
uip df files download a1b2c3d4-0000-0000-0000-000000000001 \
b2c3d4e5-0000-0000-0000-000000000001 invoice \
--destination ./invoice.pdf
# Default destination
uip df files download a1b2c3d4-0000-0000-0000-000000000001 \
b2c3d4e5-0000-0000-0000-000000000001 invoice
数据形状(--输出 json)
{
"Code": "FileDownloaded",
"Data": {
"EntityId": "a1b2c3d4-0000-0000-0000-000000000001",
"RecordId": "b2c3d4e5-0000-0000-0000-000000000001",
"FieldName": "invoice",
"OutputPath": "./invoice.pdf"
}
}
{
"Code": "FileDownloaded",
"Data": {
"EntityId": "a1b2c3d4-0000-0000-0000-000000000001",
"RecordId": "b2c3d4e5-0000-0000-0000-000000000001",
"FieldName": "invoice",
"OutputPath": "./invoice.pdf"
}
}
uip df 文件删除
删除附加到记录字段的文件。记录本身不受影响,只会删除命名字段上的 Blob。
参数
| 名称 | 必填 | 用途 |
|---|---|---|
<entity-id> | 是 | 实体 ID (UUID)。 |
<record-id> | 是 | 记录 ID (UUID)。 |
<field-name> | 是 | 文件字段的名称 (区分大小写)。 |
选项
| 短 | 长 | 值 | 默认 | 描述 |
|---|---|---|---|---|
-t | --tenant | name | 会话默认值 | 覆盖租户。 |
示例
uip df files delete a1b2c3d4-0000-0000-0000-000000000001 \
b2c3d4e5-0000-0000-0000-000000000001 invoice
uip df files delete a1b2c3d4-0000-0000-0000-000000000001 \
b2c3d4e5-0000-0000-0000-000000000001 invoice
数据形状(--输出 json)
{
"Code": "FileDeleted",
"Data": {
"EntityId": "a1b2c3d4-0000-0000-0000-000000000001",
"RecordId": "b2c3d4e5-0000-0000-0000-000000000001",
"FieldName": "invoice"
}
}
{
"Code": "FileDeleted",
"Data": {
"EntityId": "a1b2c3d4-0000-0000-0000-000000000001",
"RecordId": "b2c3d4e5-0000-0000-0000-000000000001",
"FieldName": "invoice"
}
}
相关内容
uip df entities— 发现包含entities get字段名称。uip df records— 管理拥有这些附件的记录。