Ask AI
Skip to main content

Create media

Function: Create Media

This action allows you to upload and save various types of files, such as images, documents, or videos, directly into your application's central media library. Once a file is uploaded, it becomes easily accessible and can be referenced or displayed throughout your application. This is perfect for managing all your application's assets in one place.

Input

  • File: The actual file (e.g., an image, a PDF document, a video) that you want to upload and add to your application's media library. This is a required input.

Output

  • Media ID: A unique identifier (a piece of text) that your application assigns to the newly uploaded file. You can use this ID to refer to or display the file elsewhere in your application.

Execution Flow

Real-Life Examples

Here are some practical ways you can use the "Create Media" action in your application:

  1. Uploading a User Profile Picture

    • Inputs:
      • File: An image file (e.g., user_avatar.png) selected by a user from their device.
    • Result: The user_avatar.png is uploaded to the media library, and a unique Media ID (e.g., IMG-PROFILE-001) is returned. This ID can then be stored in the user's profile record, allowing their avatar to be displayed across the application.
  2. Adding a Product Catalog Document

    • Inputs:
      • File: A PDF document (e.g., spring_collection_catalog.pdf) containing details of new products.
    • Result: The spring_collection_catalog.pdf is saved in the media library, and a Media ID (e.g., DOC-CATALOG-2024) is generated. This ID can be linked to a product page or a download button, enabling customers to access the catalog.
  3. Storing a Training Video for Employees

    • Inputs:
      • File: A video file (e.g., onboarding_tutorial.mp4) explaining company procedures.
    • Result: The onboarding_tutorial.mp4 is uploaded to the media library, and a Media ID (e.g., VID-TRAINING-HR) is provided. This ID can be embedded into an internal training portal, allowing employees to watch the video directly.