Ask AI
Skip to main content

Get media

Function: Get media

This action allows you to retrieve a specific media file, such as an image, document, or video, from your platform's storage. Once retrieved, the file is made available within your application's current process, ready for further use in subsequent actions.

Input,

  • Media ID (Text): This is the unique identifier for the media file you want to load. You must provide this ID so the system knows which file to fetch.

Output,

  • Result (File): This is the actual media file that was loaded. You can specify a name for the variable where this file will be stored for use in other actions. If you don't provide a name, the file will be stored in a variable called MEDIA_FILE by default.

Execution Flow,

Real-Life Examples,

Example 1: Displaying a Product Image

Imagine you have a product page and need to display the main image for a specific product.

  • Inputs:
    • Media ID: product_image_456
    • Result: ProductDisplayImage
  • Result: The image file identified by product_image_456 is loaded and stored in a variable named ProductDisplayImage. You can then use this variable in a UI element to show the image on your product page.

Example 2: Downloading a User Manual

A user clicks a button to download a PDF user manual for a device.

  • Inputs:
    • Media ID: manual_device_xyz_v2
    • Result: UserManualPDF
  • Result: The PDF file identified by manual_device_xyz_v2 is loaded and stored in a variable named UserManualPDF. This variable can then be passed to another action that initiates a download for the user.

Your application needs to retrieve the company's default logo for various reports, and you want to use the default variable name.

  • Inputs:
    • Media ID: company_logo_main
    • Result: (Left blank, uses default)
  • Result: The logo file identified by company_logo_main is loaded and stored in the default variable named MEDIA_FILE. This MEDIA_FILE variable can then be used in subsequent actions to embed the logo in reports or emails.