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.
This component is used when a file needs to be permanently removed from the database, ensuring storage optimization and compliance with data retention policies.
fileId
string
The unique identifier of the file to be deleted.
in
Accepts the file ID of the file to be removed.
deleted
Emits the fileId
of the successfully deleted file.
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.
fileId
string
The identifier of the deleted file.
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.