UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

uip df 文件

“uip df files”的语法和选项,用于管理 Data Fabric 记录文件字段上的 Blob 附件。

uip df files管理存储在记录文件字段中的 Blob 附件。所有三个动词都采用相同的三个位置参数,即实体 ID、记录 ID 和字段名称(区分大小写)。字段名称可以通过uip df entities get发现。

大纲​

uip df files upload <entity-id> <record-id> <field-name> -f <path> [--folder-key <key>]
uip df files download <entity-id> <record-id> <field-name> [--destination <path>] [--folder-key <key>]
uip df files delete <entity-id> <record-id> <field-name> -y --reason <text> [--folder-key <key>]
uip df files upload <entity-id> <record-id> <field-name> -f <path> [--folder-key <key>]
uip df files download <entity-id> <record-id> <field-name> [--destination <path>] [--folder-key <key>]
uip df files delete <entity-id> <record-id> <field-name> -y --reason <text> [--folder-key <key>]

每个动词还接受 --folder-key <key>(文件夹 GUID,适用于属于文件夹作用域实体的记录)。

动词​

动词用途
upload上传文件至记录字段。
download下载附加到记录字段的文件。
delete删除附加到记录字段的文件。

uip df 文件上传​

上传文件至记录字段。

参数​

名称必填用途
<entity-id>是实体 ID (UUID)。
<record-id>是记录 ID (UUID)。
<field-name>是文件字段的名称 (区分大小写)。

选项​

短长值默认描述
-f--file路径必填要上传的文件的路径。
—--folder-key键值—对于文件夹范围内的实体,包含实体的文件夹的文件夹密钥 (GUID)。

示例​

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>是文件字段的名称 (区分大小写)。

选项​

短长值默认描述
—--destination路径<record-id>_<field-name>.bin输出文件路径。
—--folder-key键值—对于文件夹范围内的实体,包含实体的文件夹的文件夹密钥 (GUID)。

示例​

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>是文件字段的名称 (区分大小写)。

选项​

短长值默认描述
-y--yes标记—必需。确认这是一个不可逆的操作。
—--reasontext—必需。删除原因 — 在响应中回显,以便调用者可以记录。
—--folder-key键值—对于文件夹范围内的实体,包含实体的文件夹的文件夹密钥 (GUID)。

示例​

uip df files delete a1b2c3d4-0000-0000-0000-000000000001 \
    b2c3d4e5-0000-0000-0000-000000000001 invoice \
    --yes --reason "wrong file attached"
uip df files delete a1b2c3d4-0000-0000-0000-000000000001 \
    b2c3d4e5-0000-0000-0000-000000000001 invoice \
    --yes --reason "wrong file attached"

数据形状(--输出 json)​

{
  "Code": "FileDeleted",
  "Data": {
    "EntityId": "a1b2c3d4-0000-0000-0000-000000000001",
    "RecordId": "b2c3d4e5-0000-0000-0000-000000000001",
    "FieldName": "invoice",
    "Reason": "wrong file attached"
  }
}
{
  "Code": "FileDeleted",
  "Data": {
    "EntityId": "a1b2c3d4-0000-0000-0000-000000000001",
    "RecordId": "b2c3d4e5-0000-0000-0000-000000000001",
    "FieldName": "invoice",
    "Reason": "wrong file attached"
  }
}

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新