User Manual

Download File From Bucket

Download File From Bucket

Download File From Bucket allows a file previously uploaded to a specific Bucket on the Kuika platform (e.g., using Upload File To Bucket) to be downloaded to the client or background. This action allows users to access files within the application and securely manage content viewing and downloading.

Supported providers are Amazon S3 and Google Cloud Storage, each managed through the Configuration Manager.

This action is available in both web and mobile applications. Depending on the provider, users may need to provide their own connection details (Access Key, Secret Key, Connection String).

Download File From Bucket Action Steps

1. Action Definition

  • Open your project on the Kuika platform.
  • In the UI Design module, click the Add Action button on the right side and select the Download File From Bucket action.

2. Specifying Parameters

  • Key Name (String – required): The unique name of the file in the bucket. Example: user_123/avatar.png
    • Can usually be assigned as Action Result, Current, Form Component, Screen Input, or Fixed.
  • Bucket Name (String – required): You can only select AWS or Google as the cloud provider.
  • File Name (String – required): The name and extension of the downloaded file to be saved on the client side. Example: my_avatar.png
  • Encrypt (Boolean – optional): If bucket encryption is used, this parameter can be used for verification during the download process.
    • true → Encryption check is performed.
    • false → Encryption check is not performed.

Running and Testing the Action

  1. Run the action in Preview mode.
  2. If successful, the specified file is downloaded to the client or becomes available in the background.
  3. If unsuccessful, the bucket name, key, filename, or connection information should be checked via the error message.
  4. Sample Test: For AWS S3, you can verify that the file is downloaded using the command aws s3 cp s3://kuika-media-storage/user_123/avatar.png ./my_avatar.png in the terminal.

Usage Scenario: User Avatar File Download

In a social media application, when a user wants to view their profile picture:

  • The avatar file is retrieved from the Bucket using the Key Name.
  • The file is downloaded to the client or loaded for preview using the File Name parameter.
  • This allows the user to quickly view their old or new avatar.

Step-by-Step Usage

  1. File Check: The Object Key of the avatar is retrieved on the user profile screen.
  2. Execute Download File From Bucket Action: It is linked to the OnClick event.
    • Parameters:
      • Key Name: user_123/avatar.png
      • Bucket Name: You can only select AWS or Google as the cloud provider.
      • File Name: my_avatar.png
      • Encrypt: false
  3. Next Actions:
    • If the file is downloaded successfully: It is displayed on the preview screen.
    • If the download fails: The user is shown the warning “File could not be downloaded, please try again.”

Download File From Bucket Action Advanced Customizations

  • Dynamic Key Name: The file can be dynamically determined based on user ID, date, or another parameter.
  • Multiple File Download: To download multiple files, the action can be run sequentially or triggered in a loop.
  • Conditional Download: Only users with a specific role can download the file (can be integrated with the Authorization panel).
  • Integration with Cache or Storage: Previously downloaded files can be cached to prevent them from being downloaded again.

Technical Risks

  • Incorrect Key Name Usage: The file cannot be found if an incorrect or incomplete key is entered.
  • Unauthorized Access: Bucket download operations should only be triggered by authorized users.
  • Encrypt Settings: Incorrect encryption parameters can cause the download to fail.
  • Connection Errors: An incorrect Connection String or Access Key can prevent access to the Bucket.
  • Provider Differences: Error messages may differ between AWS and GCP; provider-specific logging should be implemented.

The Download File From Bucket action allows you to securely and reliably download files stored in a bucket to the client in Kuika applications. It offers flexible and secure file management thanks to dynamic parameter support, encryption control, and provider compatibility.

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar