Overview
This node integrates with the AIGC Network Disk service to perform file operations such as listing files, uploading files (from local binary data or external URLs), retrieving file information, downloading files, and deleting files (individually or in batches).
The "下载文件" (Download File) operation specifically downloads a file from the AIGC Network Disk by its file ID and outputs the file content as binary data within the workflow. This is useful when you want to retrieve stored files for further processing, analysis, or transfer within an n8n workflow.
Practical example:
- Downloading a user-uploaded document by its ID to process it in subsequent nodes (e.g., text extraction or conversion).
- Fetching images or media files stored on AIGC Network Disk to include them in reports or send via email.
Properties
| Name | Meaning |
|---|---|
| 文件ID (fileId) | The unique identifier of the file to download. Required to specify which file to fetch. |
| 输出数据字段名 (binaryPropertyName) | The name of the binary data field where the downloaded file will be saved. Default is "data". |
Output
The output JSON object includes metadata about the downloaded file and the binary data itself:
success: Boolean indicating if the download was successful.operation: The string"downloadFile"indicating the performed operation.fileId: The ID of the downloaded file.filename: The original or assigned filename of the downloaded file.fileSize: Size of the file in bytes.mimeType: MIME type of the file.downloadUrl: The URL from which the file was downloaded.binary: An object containing the binary data keyed by the user-definedbinaryPropertyName. This binary data represents the actual file content and can be used downstream in the workflow.
If the file cannot be downloaded, the node throws an error with descriptive messages.
Dependencies
- Requires an API key credential for authenticating requests to the AIGC Network Disk API.
- The node uses HTTP requests to interact with the AIGC Network Disk REST API endpoints.
- No additional environment variables are explicitly required beyond the API authentication setup.
Troubleshooting
- Empty or invalid file ID: The node requires a non-empty file ID; otherwise, it throws an error.
- No download URL available: If the file metadata does not contain a valid download URL, the node will fail.
- HTTP errors:
- 404: File not found or expired. Check the file ID correctness and file availability.
- 403: Insufficient permissions to download the file. Ensure the API token has proper access rights.
- 401: Invalid or expired API token. Refresh or reconfigure the API credentials.
- 5xx: Server-side errors; retry after some time.
- Timeouts or network issues: May cause download failures; verify network connectivity and increase timeout if needed.
- Binary data preparation errors: Ensure the input/output binary property names are correctly set and that the file content is accessible.
Links and References
- AIGC Network Disk API Documentation (Not provided in source, placeholder for official docs)
- n8n documentation on working with binary data
- n8n documentation on HTTP Request node (for understanding underlying HTTP calls)