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:
-
Uploading a User Profile Picture
- Inputs:
- File: An image file (e.g.,
user_avatar.png) selected by a user from their device.
- File: An image file (e.g.,
- Result: The
user_avatar.pngis uploaded to the media library, and a uniqueMedia 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.
- Inputs:
-
Adding a Product Catalog Document
- Inputs:
- File: A PDF document (e.g.,
spring_collection_catalog.pdf) containing details of new products.
- File: A PDF document (e.g.,
- Result: The
spring_collection_catalog.pdfis saved in the media library, and aMedia 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.
- Inputs:
-
Storing a Training Video for Employees
- Inputs:
- File: A video file (e.g.,
onboarding_tutorial.mp4) explaining company procedures.
- File: A video file (e.g.,
- Result: The
onboarding_tutorial.mp4is uploaded to the media library, and aMedia 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.
- Inputs: