Create media files
Function: Create media files
This function allows you to upload one or more files from your device directly into your application's media library. Once uploaded, these files become accessible within your application, and you receive unique identifiers for each, which you can use to reference them later.
Input,
- Files: This is a list of the actual files you want to upload. You can select multiple files at once.
- Output Variable Name: This is the name you want to give to the variable that will store the unique IDs of the uploaded media files. If you leave this blank, the system will automatically name this variable
MEDIA_IDS.
Output,
- [Your chosen variable name, e.g., MEDIA_IDS]: A list of unique identifiers (IDs) for each file that was successfully uploaded. You can use these IDs to display the files, link to them, or manage them within your application.
Execution Flow,
Real-Life Examples,
Example 1: Uploading User Profile Pictures
Imagine you're building a social networking app where users can upload their profile picture and a cover photo.
- Inputs:
- Files:
[profile_pic.jpg, cover_photo.png](The actual image files selected by the user) - Output Variable Name:
USER_IMAGE_IDS
- Files:
- Result: Both
profile_pic.jpgandcover_photo.pngare uploaded to your application's media library. A new variable namedUSER_IMAGE_IDSwill be created, containing a list of the unique IDs for these two uploaded images (e.g.,["uuid-profile-123", "uuid-cover-456"]). You can then use these IDs to display the images on the user's profile page.
Example 2: Adding Product Images to an E-commerce Store
You're managing an online store and want to add multiple images for a new product, like a pair of shoes.
- Inputs:
- Files:
[shoe_front.jpeg, shoe_side.jpeg, shoe_detail.jpeg](Three different views of the product) - Output Variable Name: (Left blank)
- Files:
- Result: The three product images are uploaded to your media library. Since no output variable name was provided, a variable named
MEDIA_IDSwill be created, holding a list of the unique IDs for these images (e.g.,["uuid-shoe1", "uuid-shoe2", "uuid-shoe3"]). You can then associate these IDs with your product record to display them on the product page.
Example 3: Storing Project Documents
In a project management application, you need to upload several documents related to a new project.
- Inputs:
- Files:
[project_proposal.pdf, budget_spreadsheet.xlsx, team_roster.doc](Various document files) - Output Variable Name:
PROJECT_DOC_IDS
- Files:
- Result: All three document files are uploaded to your media library. A variable named
PROJECT_DOC_IDSwill be created, containing a list of their unique IDs (e.g.,["uuid-prop-789", "uuid-budget-012", "uuid-team-345"]). These IDs can then be linked to the specific project record, allowing team members to access the documents directly from the project page.