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
fileId
string
The unique identifier of the file to be deleted.
Input Ports
in
Accepts the file ID of the file to be removed.
Output Ports
deleted
Emits the fileId
of the successfully deleted file.
Processing Logic
Receives Input Data:
Accepts a
fileId
that identifies the file to be deleted.
Deletes the File:
Locates the file in the database.
Removes the file permanently.
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
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