Remove File

Overview

The Remove File Component removes a specified file from the database using its unique file ID. This ensures that unwanted or obsolete files are deleted efficiently from the system.

Usage

This component is used when a file needs to be permanently removed from the database, ensuring storage optimization and compliance with data retention policies.

Properties

Property
Type
Description

fileId

string

The unique identifier of the file to be deleted.

Input Ports

Port
Description

in

Accepts the file ID of the file to be removed.

Output Ports

Port
Description

deleted

Emits the fileId of the successfully deleted file.

Processing Logic

  1. Receives Input Data:

    • Accepts a fileId that identifies the file to be deleted.

  2. Deletes the File:

    • Locates the file in the database.

    • Removes the file permanently.

  3. Confirms Deletion:

    • Emits the fileId of the deleted file as confirmation.

    • If an error occurs (e.g., file not found), it is logged or raised appropriately.

Output Data Schema

Property
Type
Description

fileId

string

The identifier of the deleted file.

Notes

  • Permanent Deletion: Once removed, the file cannot be recovered.

  • Efficient Storage Management: Helps free up space in the database.

  • Error Handling: Ensures errors are logged when deletion fails.

Last updated