Ask AI
Skip to main content

Read file from cloud storage

Function: Read file from cloud storage

This function allows you to retrieve a specific file from your cloud storage service. It acts as a bridge to access documents, images, or any other files you have stored in the cloud, bringing them into your application for further use or processing.

Input

  • Bucket URL: (STRING) This is the unique web address or identifier for the specific storage container (often called a "bucket") in your cloud storage where the file is located. This input is required.
  • Access Token: (STRING) This is a secure code or key that grants your application permission to access your cloud storage. Think of it as a digital key to unlock your cloud files. This input is required.

Output

  • Access token variable name: (STRING) After the file reading operation, this output provides the name of the variable that held the access token used to connect to the cloud storage. This can be useful for tracking which credentials were used for the operation.

Execution Flow

Real-Life Examples

Here are some practical ways you can use the "Read file from cloud storage" function:

Example 1: Retrieving a Daily Sales Report

  • Scenario: Your e-commerce platform generates a daily sales report as a CSV file and stores it in a cloud bucket. You want to automatically fetch this report into your application for analysis.
  • Inputs:
    • Bucket URL: gs://my-company-reports/sales/
    • Access Token: ya29.a0AfH6SMAA... (a valid, secure access token)
  • Result: The daily sales report file from gs://my-company-reports/sales/ is retrieved into your application. The output Access token variable name might be SALES_REPORT_ACCESS_KEY, confirming which credential was used.

Example 2: Loading User Profile Images

  • Scenario: Your social media application stores user profile pictures in a dedicated cloud storage bucket. When a user views a profile, you need to load their image.
  • Inputs:
    • Bucket URL: s3://user-profiles/images/john_doe.jpg
    • Access Token: AKIAIOSFODNN7EXAMPLE (a valid, secure access token)
  • Result: The profile image file for 'john_doe.jpg' is fetched from the cloud storage and displayed in the application. The output Access token variable name might be PROFILE_IMAGE_TOKEN, indicating the credential used.

Example 3: Accessing a Configuration File

  • Scenario: Your application uses a central configuration file (e.g., config.json) stored in cloud storage to manage various settings. You need to read this file when the application starts or when settings are updated.
  • Inputs:
    • Bucket URL: azureblob://app-settings/config.json
    • Access Token: DefaultEndpointsProtocol=https;AccountName=... (a valid, secure access token)
  • Result: The config.json file is retrieved from the cloud storage, allowing your application to load its settings. The output Access token variable name might be APP_CONFIG_AUTH, confirming the credential used for access.