UiPath Documentation
apps
2023.4
false
Apps ユーザー ガイド
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。

ファイル ピッカー コントロールを使用してファイルをアップロードする

ストレージ バケットを使用する

前提条件

ファイル コントロールをアプリケーションに追加する前に、ストレージ バケットを Orchestrator 内で設定し、アプリケーション内にインポートする必要があります。

For more information how to achieve this, see Referencing a Storage Bucket from Orchestrator.

注:

In places where you want to pass 'uploaded file name' as an input to a process, instead of directly setting the process input parameter with the uploaded file name, you should use an app variable to set the uploaded file name. You can then perform an input override of the process argument with the app variable, to pass the uploaded file name to the process.

手順

  1. ファイル コントロールを追加するアプリに移動します。

  2. [コントロールを追加] > [入力] コントロールに移動し、新しい [ファイル ピッカー] コントロールをアプリに追加します。

  3. 必要に応じて、ファイル ピッカー コントロールを設定します。

    3.1 最大ファイル サイズを選択します。

    3.2 .jpg, .pdf, .png の形式で、[許可されるファイルの種類] フィールドに入力します。

    3.3 実行時にコントロールに表示するテキストを [ヘルパー テキスト] フィールドに入力します。

    3.4 必要に応じて、[その他のプロパティ] セクションを設定します。

    3.5 Configure the style of the control according to your needs. For short tips on how to design an app, see General User Experience Guidelines.

  4. [新しいコントロールを追加] > [入力] に移動し、アプリのファイル ピッカー コントロールの下に新しいボタン コントロールを追加して、名前を Upload に変更します。

  5. 新しいボタン コントロールで、[イベント] > [ルールを作成] に移動し、このコントロール用に [ストレージ バケットへファイルをアップロード] ルールを作成します。

  6. [ストレージ バケットへファイルをアップロード] ルールを設定します。

    6.1 [アップロードするファイル] フィールドに、ファイル ピッカー コントロールを追加します。

    6.2 「前提条件」の手順でインポートしたストレージ バケットを追加します。

    6.3 To make sure that files do not get overwritten, we recommend keeping the Auto-generate name box checked. If you want to create a name by yourself, uncheck the Auto-generate name box. You can create a specific file name format using Concat functions and add uniqueness to filenames using the guid function. Make sure that filenames are unique so that they are not overwritten with files with the same name.

    以下の例を使用して名前を生成できます。

    • concat(filenamewithouttype,"_",guid(),filetype)
    • concat("Photo","_",guid(),filetype)

    6.4 アップロードされるファイルの名前を [完了時] セクションのアプリ変数に設定します。ファイル名を追加するには、[アップロードされるファイルの名前][値] フィールド内にドラッグ アンド ドロップします。このように、ファイル名はオートメーションに送信したり、ファイルのダウンロードに使用したりできます。

エンティティを使用する

前提条件

Before including a file control into your application, you must have an entity in Data Service and imported in your application.For more information how to achieve this, see Referencing an Entity in your App.

手順

  1. ファイル コントロールを追加するアプリに移動します。

  2. [コントロールを追加] > [入力] コントロールに移動し、新しい [ファイル ピッカー] コントロールをアプリに追加します。

  3. 必要に応じて、ファイル ピッカー コントロールを設定します。

    3.1 最大ファイル サイズを選択します。

    3.2 .jpg, .pdf, .png の形式で、[許可されるファイルの種類] フィールドに入力します。

    3.3 実行時にコントロールに表示するテキストを [ヘルパー テキスト] フィールドに入力します。

    3.4 必要に応じて、[その他のプロパティ] セクションを設定します。

    3.5 Configure the style of the control according to your needs. For short tips on how to design an app, see General User Experience Guidelines.

  4. [新しいコントロールを追加] > [入力] に移動し、アプリのファイル ピッカー コントロールの下に新しいボタン コントロールを追加して、名前を Upload に変更します。

  5. 新しい [ボタン] コントロールで、[イベント] > [ルールを作成] に移動し、このコントロール用に [エンティティ レコードを作成/更新] ルールを作成します。

  6. [エンティティ レコードを作成/更新] ルールを設定します。[新しくレコードを作成するエンティティ/更新するエンティティ レコードを選択] フィールドに、画像を含むエンティティ ([前提条件] で設定) を必ず追加してください。

  7. If you have a data context configured, you can also reference it in the Create/Update Entity Record rule. For more information on data context, see the About Data Context and Using Data Context pages.

  • ストレージ バケットを使用する
  • 前提条件
  • 手順
  • エンティティを使用する
  • 前提条件
  • 手順

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得