UiPath Documentation
activities
latest
false
工作流活动
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

上传存储文件

“上传存储文件”活动,用于将文件上传到 Orchestrator 中的指定存储桶。

UiPath.Core.Activities.Storage.UploadStorageFile

描述

将文件上传到 Orchestrator 中的指定存储桶。

备注:

Orchestrator 权限

此活动在执行它的机器人的 Orchestrator 帐户下运行。它必须拥有对目标文件夹的以下Orchestrator 角色权限

  • Storage Buckets.View :用于解析存储桶
  • Storage Files.Create :用于将文件上传或写入存储桶
  • Folders.View :用于浏览和选择 Orchestrator 文件夹

项目兼容性

Windows - 旧版 | Windows | 跨平台

跨平台配置

  • “Orchestrator 文件夹路径” — 要用于此活动的 Orchestrator 文件夹的路径。如果留空,则使用当前的 Orchestrator 文件夹。此字段仅支持字符串和String变量。使用/作为子文件夹分隔符以指定所需的文件夹。
  • “存储桶名称”— 要上传文件的存储桶的名称。此字段为必填字段。此字段仅支持字符串和 String 变量。
  • “文件” — 要上传到上述存储桶的文件的完整路径。您可以在使用本地路径或IResource类型的变量之间切换。如果您使用的是本地路径,则建议使用相对文件夹路径,以解决执行项目时 Windows 和 Linux 计算机之间不同的文件结构。示例: newFolder/newFileName.txt
  • “上传位置”— 将文件上传到存储桶的路径。

1对于在 Studio Web 中创建的作为解决方案一部分的跨平台项目, Orchestrator 文件夹路径字段不可用。

2对于在 Studio Web 中创建的作为解决方案一部分的跨平台项目, “名称”字段提供了用于在设计时定义新的Orchestrator 资源(例如队列、资产或存储桶)或“打开 Orchestrator进行资源管理”的选项。

高级选项

其他
  • Timeout (milliseconds)—Specifies the amount of time (in milliseconds) to wait for Orchestrator to respond, or for the file transfer to make progress, before an error is thrown. It does not limit total transfer time, so large files over slow connections still complete. The default value is 300000 milliseconds (5 minutes). Opening a connection is always limited to 30 seconds.

    备注:

    On a timeout the activity fails with a TimeoutException carrying the error code Orchestrator_Sys_Timeout, so Continue On Error and Retry Scope apply as they do to any other error. A value of 0 or a negative number is replaced with 30 seconds, and cancelling the job is reported as a cancellation rather than a timeout.

    When Orchestrator serves the file content itself instead of handing out a provider URL, which is the case on Orchestrator-managed storage with the Features.Buckets.StorageOffloadRequiresAuth feature enabled, the upload must also finish in total within this value.

  • “出错时继续”— 指定在活动引发错误时是否应继续自动化操作。 该字段仅支持“布尔值”(TrueFalse)。默认值为 False。因此,如果该字段为空且活动引发错误,系统将停止执行项目。如果该值设为“True”,则无论出现何种错误,系统都将继续执行项目。

    备注:

    如果“Try Catch 异常处理”中包含该活动且“出错时继续”属性的值为“True”,则系统在执行项目时不会捕获任何错误。

Windows - 旧版 Windows 配置

  • “目标”— 将文件上传到存储桶的路径。使用 \ 作为目录分隔符来指定所需的目标目录。如果目标文件已存在,则将其覆盖。此字段仅支持字符串和 String 变量。
  • “文件” — 要上传到“存储桶名称”字段中指示的存储桶的文件的完整路径。此字段支持IResource类型的变量。当要在执行过程中动态获取文件时(例如获取电子邮件中的附件),请使用此字段。
  • “路径”— 要上传到指定存储桶的文件的完整本地路径。根据运行时执行目录解析相对路径。此字段仅支持字符串和 String 变量。当文件位于项目文件夹中时,请使用此字段。
  • “存储桶名称”— 要上传文件的存储桶的名称。此字段为必填字段。此字段仅支持字符串和 String 变量。
    重要提示:

    您必须使用其中一个字段,因为它们互斥。指定本地路径时,请始终使用相对文件夹路径,以确保 Windows 和 Linux 系统上不同文件结构的兼容性。例如: newFolder/newFileName.txt

属性面板

常见
  • “出错时继续”— 指定在活动引发错误时是否应继续自动化操作。 该字段仅支持“布尔值”(TrueFalse)。默认值为 False。因此,如果该字段为空且活动引发错误,系统将停止执行项目。如果该值设为“True”,则无论出现何种错误,系统都将继续执行项目。

    备注:

    如果“Try Catch 异常处理”中包含该活动且“出错时继续”属性的值为“True”,则系统在执行项目时不会捕获任何错误。

  • “显示名称”— 活动的显示名称。

  • Timeout (milliseconds)—Specifies the amount of time (in milliseconds) to wait for Orchestrator to respond, or for the file transfer to make progress, before an error is thrown. It does not limit total transfer time, so large files over slow connections still complete. The default value is 300000 milliseconds (5 minutes). Opening a connection is always limited to 30 seconds.

    备注:

    On a timeout the activity fails with a TimeoutException carrying the error code Orchestrator_Sys_Timeout, so Continue On Error and Retry Scope apply as they do to any other error. A value of 0 or a negative number is replaced with 30 seconds, and cancelling the job is reported as a cancellation rather than a timeout.

    When Orchestrator serves the file content itself instead of handing out a provider URL, which is the case on Orchestrator-managed storage with the Features.Buckets.StorageOffloadRequiresAuth feature enabled, the upload must also finish in total within this value.

来源
  • “文件” — 要上传到“存储桶名称”字段中指示的存储桶的文件的完整路径。此字段支持IResource类型的变量。当要在执行过程中动态获取文件时(例如获取电子邮件中的附件),请使用此字段。
  • “路径”— 要上传到指定存储桶的文件的完整本地路径。根据运行时执行目录解析相对路径。此字段仅支持字符串和 String 变量。当文件位于项目文件夹中时,请使用此字段。
    重要提示:

    您必须使用其中一个字段,因为它们互斥。指定本地路径时,请始终使用相对文件夹路径,以确保 Windows 和 Linux 系统上不同文件结构的兼容性。例如: newFolder/newFileName.txt

其他
  • “文件夹路径”— 要用于此活动的 Orchestrator 文件夹的路径。如果留空,则会使用当前的 Orchestrator 文件夹。此字段仅支持字符串和 String 变量。使用 / 作为子文件夹分隔符以指定所需的文件夹。
  • “私有”— 选中后将不再以“Verbose”级别记录变量和参数的值。
存储
  • “目标”— 将文件上传到存储桶的路径。使用 \ 作为目录分隔符来指定所需的目标目录。如果目标文件已存在,则将其覆盖。此字段仅支持字符串和 String 变量。
  • “存储桶名称”— 要上传文件的存储桶的名称。此字段为必填字段。此字段仅支持字符串和 String 变量。
  • 描述
  • 项目兼容性
  • 跨平台配置
  • 高级选项
  • Windows - 旧版 Windows 配置
  • 属性面板

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新