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>]

Every verb also accepts --folder-key <key> (a folder GUID, for records that belong to a folder-scoped entity).

动词

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

uip df 文件上传

上传文件至记录字段。

参数

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

选项

默认描述
-f--file路径必填要上传的文件的路径。
--folder-key键值Folder key (GUID) of the folder containing the entity, for folder-scoped entities.

示例

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键值Folder key (GUID) of the folder containing the entity, for folder-scoped entities.

示例

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标记Required. Acknowledges this is an irreversible operation.
--reasontextRequired. Reason for the deletion — echoed back in the response so the caller can log it.
--folder-key键值Folder key (GUID) of the folder containing the entity, for folder-scoped entities.

示例

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 论坛

保持更新