Overview
This node integrates with the AIGC Network Disk service to perform file management operations such as listing files, uploading files, downloading files, retrieving file information, and deleting files. Specifically, the "删除文件" (Delete File) operation allows users to delete a specified file from their AIGC Network Disk storage by providing its file ID.
This node is beneficial in scenarios where automated workflows require managing cloud-stored files, such as cleaning up obsolete files, automating file lifecycle management, or integrating file deletion into larger data processing pipelines.
Example use cases:
- Automatically deleting temporary files after processing.
- Removing user-uploaded files upon account deletion.
- Cleaning up files that are no longer needed based on workflow logic.
Properties
| Name | Meaning |
|---|---|
| 文件ID | The ID of the file to be deleted |
Output
The output JSON object for the delete file operation contains:
success: Boolean indicating if the deletion was successful.data: The raw response data from the API confirming deletion.operation: The string"deleteFile"indicating the performed operation.fileId: The ID of the deleted file.message: A success message confirming the file deletion.
If an error occurs, the output will contain an error message describing the failure.
Dependencies
- Requires an API key credential for authenticating requests to the AIGC Network Disk API.
- The node uses HTTP requests to communicate with the AIGC Network Disk service endpoints.
- Proper network connectivity to the AIGC Network Disk API server is required.
Troubleshooting
- File ID empty or invalid: The node throws an error if the file ID parameter is missing or empty. Ensure the file ID is correctly provided.
- File not found (404): If the file does not exist or has already been deleted, the node returns an error indicating the file ID was not found.
- Permission denied (403): Deletion is only allowed for files uploaded by the authenticated user. Attempting to delete others' files results in a permission error.
- Invalid or expired API token (401): The API authentication token may be invalid or expired. Refresh or reconfigure the API credentials.
- Server errors (5xx): Internal server errors at the API side may occur; retry after some time.
- Network issues: Connectivity problems can cause request failures; verify network access to the API endpoint.
Links and References
- AIGC Network Disk API Documentation (Note: Replace with actual URL if available)
- n8n documentation on Creating Custom Nodes