Ask AI
Skip to main content

Delete media files

Function: Delete media files

This function allows you to permanently remove media files, such as images, documents, or videos, from your application's media library. This is useful for cleaning up unused files, managing storage, or ensuring data privacy by removing specific content.

Input,

  • Media IDs: A list of unique identifiers (text) for the media files you wish to delete. You must provide at least one Media ID.

Output,

This function does not return any direct output. Its primary effect is the removal of the specified media files from your application.

Execution Flow,

Real-Life Examples,

Example 1: Deleting an old product image

Imagine you've updated your product catalog and an old image for a product is no longer needed. You want to remove it to keep your media library clean.

  • Inputs:
    • Media IDs: ["prod_img_12345"]
  • Result: The image with the ID "prod_img_12345" is permanently removed from your application's media library and storage.

After a project is completed, you might have several associated documents (e.g., proposals, drafts, final reports) that you want to delete to free up space or comply with data retention policies.

  • Inputs:
    • Media IDs: ["doc_projA_proposal", "doc_projA_draft", "doc_projA_final"]
  • Result: All three specified documents related to Project A are permanently deleted from your application's media library and storage.

Example 3: Removing user-uploaded profile pictures after account deletion

When a user deletes their account, you might want to automatically remove their uploaded profile picture to ensure their data is fully purged from your system.

  • Inputs:
    • Media IDs: ["user_profile_pic_9876"]
  • Result: The profile picture associated with the user account (ID "user_profile_pic_9876") is permanently removed from your application's media library and storage.