Delete media
Function: Delete media
This action allows you to permanently remove a media file from your application's media library. Once deleted, the media file will no longer be accessible or usable within your application. This is useful for cleaning up old, unused, or incorrect media assets.
Input
- Media ID (STRING, Required): The unique identifier for the specific media file you wish to delete. This ID helps the system locate and remove the correct file from your application's media library.
Output
This action does not produce any direct output that can be used in subsequent steps. Its primary outcome is the permanent removal of the specified media file from your application.
Execution Flow
Real-Life Examples
Here are some practical examples of how you can use the "Delete media" action in your application:
Example 1: Removing an outdated product image
Imagine you have an e-commerce application and a product's image has been updated. You want to remove the old image to avoid confusion and free up storage.
- Inputs:
- Media ID:
product_image_old_version_12345
- Media ID:
- Result: The old product image with the ID
product_image_old_version_12345is permanently removed from your application's media library and will no longer appear in your product catalog.
Example 2: Deleting a temporary user profile picture
A user uploaded a temporary profile picture but has now decided to use a different one or remove it entirely. You want to clean up the unused temporary file.
- Inputs:
- Media ID:
user_profile_temp_avatar_98765
- Media ID:
- Result: The temporary user profile picture identified by
user_profile_temp_avatar_98765is permanently deleted from your application's storage.
Example 3: Cleaning up an expired promotional banner
Your application displayed a promotional banner for a holiday sale that has now ended. To keep your media library organized and efficient, you decide to remove the expired banner.
- Inputs:
- Media ID:
promo_banner_holiday_2023_expired
- Media ID:
- Result: The expired holiday promotional banner with the ID
promo_banner_holiday_2023_expiredis removed from the media library, ensuring it's no longer used and freeing up storage space.