Actions118
- Item Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- Field Actions
- File Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Server Actions
- Setting Actions
- User Actions
- Utility Actions
- Webhook Actions
File → Delete
AI-generatedOverview
This node deletes a file object in the Directus system based on a unique file ID provided as input. It is useful for scenarios where you need to programmatically remove files from your Directus-managed storage, such as cleaning up unused files or managing file lifecycle automatically.
Use Case Examples
- Deleting a file by its unique ID to free up storage space.
- Automating file removal as part of a workflow when a related record is deleted.
Properties
| Name | Meaning |
|---|---|
| ID | Unique ID of the file object to be deleted |
Output
JSON
success- Indicates whether the file deletion was successfulmessage- Additional information or error message related to the deletion operation
Dependencies
- Requires an API key credential or authentication token to access the Directus API.
Troubleshooting
- Ensure the provided file ID is correct and exists in the Directus system; otherwise, the deletion will fail.
- Check that the API credentials have sufficient permissions to delete files.
- Common error messages include 'File not found' if the ID is invalid, or 'Unauthorized' if authentication fails.
Links
- Directus API - Delete a File - Official documentation for deleting files using the Directus API.