AIGC网盘

与AIGC网盘进行文件操作的集成节点

Overview

This node integrates with the AIGC Network Disk service to perform file management operations such as uploading files, listing files, retrieving file information, downloading files, and deleting files. It is particularly useful for automating workflows that involve cloud file storage and management, enabling users to programmatically handle files within their automation pipelines.

A common scenario includes uploading binary data from previous nodes into the AIGC Network Disk, tagging and categorizing files for organization, or downloading files for further processing. For example, a user might upload images generated by an AI model directly to the network disk, or download documents stored there for analysis.

The "上传文件" (upload file) operation specifically uploads local binary data to the AIGC Network Disk, allowing users to specify metadata such as description, category, tags, and expiration time.

Properties

Name Meaning
输入数据字段名 The name of the binary data field in the input containing the file to upload. Default: "data".
文件描述 Description information about the file being uploaded.
文件分类 File category selection. Options: 图片 (Image), 文档 (Document), 音频 (Audio), 视频 (Video), 其他 (Other). Default: 其他 (Other).
文件标签 File tags, multiple tags separated by commas (e.g., 测试,示例,重要).
过期时间(秒) File expiration time in seconds. Default is 300 seconds (5 minutes). Maximum is 30 days.

Output

The output JSON object for the upload operation contains:

  • success: Boolean indicating if the upload was successful.
  • data: The response data from the AIGC Network Disk API after uploading the file.
  • operation: The string "uploadFile" indicating the performed operation.
  • filename: The name of the uploaded file.
  • fileSize: Size of the uploaded file in bytes.
  • mimeType: MIME type of the uploaded file.

No binary data is output by this operation since it uploads data rather than returning it.

Example output structure:

{
  "success": true,
  "data": { /* API response details */ },
  "operation": "uploadFile",
  "filename": "example.jpg",
  "fileSize": 123456,
  "mimeType": "image/jpeg"
}

Dependencies

  • Requires an API key credential for authenticating requests to the AIGC Network Disk API.
  • The node uses HTTP requests with authentication to interact with the remote service.
  • No additional environment variables are explicitly required beyond the API credential configuration.

Troubleshooting

  • Missing or invalid binary data field: If the specified binary property name does not exist or contains no data, the node will throw an error. Ensure the input data has the correct binary field.
  • Upload failures: Errors during upload may be caused by network issues, invalid credentials, or exceeding file size limits. The node throws descriptive errors including the failure reason.
  • Expiration time limits: The expiration time must be positive and not exceed 30 days; otherwise, the API may reject the request.
  • File category and tags: Invalid category values or malformed tags may cause unexpected behavior; use the provided options and comma-separated format respectively.

Common error messages include:

  • "文件上传失败: [error message]" — Indicates upload failure with details.
  • Validation errors for empty or invalid parameters.
  • HTTP errors propagated from the API with status codes and messages.

To resolve issues, verify all input parameters, ensure valid API credentials, and check network connectivity.

Links and References

  • AIGC Network Disk API documentation (not provided here, but typically available from the service provider)
  • n8n documentation on creating custom nodes and handling binary data: https://docs.n8n.io/
  • General best practices for file uploads in automation workflows

Discussion