AIGC网盘 - 上传文件

上传本地文件到AIGC网盘,支持多种文件类型和自定义设置

Overview

This node uploads local binary files to the AIGC Network Disk cloud storage service. It supports multiple file categories and allows users to add descriptions, tags, and set expiration times for uploaded files. This is useful for automating file backups, sharing files in workflows, or managing media assets with metadata.

Practical examples:

  • Uploading images or documents from previous workflow steps to a centralized cloud disk.
  • Tagging files with keywords for easier retrieval later.
  • Setting temporary file availability by specifying expiration time in seconds.

Properties

Name Meaning
输入数据字段名 The name of the binary data field containing the file to upload (default: "data").
文件描述 Description of the file content or purpose, used for record-keeping (optional).
文件分类 File category to facilitate management and filtering. Options: 图片 (Image), 文档 (Document), 视频 (Video), 音频 (Audio), 压缩包 (Archive), 其他 (Other). Default is 其他 (Other).
文件标签 Comma-separated tags for classifying the file, up to 10 tags, each max 20 characters.
过期时间(秒) File expiration time in seconds. Default is 300 (5 minutes), max 2592000 (30 days).

Output

The node outputs an array of JSON objects, one per input item, with the following structure:

{
  "success": true,
  "data": { /* response from the upload API */ },
  "operation": "uploadFile",
  "filename": "original_file_name.ext",
  "fileSize": 123456,
  "mimeType": "mime/type",
  "message": "文件上传成功:original_file_name.ext"
}
  • success: Indicates if the upload was successful.
  • data: Contains the detailed response from the AIGC Network Disk API.
  • operation: Always "uploadFile".
  • filename, fileSize, mimeType: Metadata about the uploaded file.
  • message: Success message including the filename.

If an error occurs and the node is configured to continue on failure, the output includes an error object with the error message and the operation name.

The node does not output binary data itself; it only uploads binary data received as input.

Dependencies

  • Requires an API key credential for authenticating with the AIGC Network Disk API.
  • Uses HTTP POST requests to /api/files/upload endpoint of the AIGC Network Disk service.
  • Timeout for upload requests is set to 120 seconds.
  • The node expects binary data to be present in the specified input field.

Troubleshooting

Common issues and error messages:

  • File format not supported or parameter error (400): The uploaded file's format may be unsupported or parameters are invalid. Check the binary data and property settings.
  • API token invalid or expired (401): The authentication token is missing, invalid, or expired. Reconfigure the API credentials.
  • No permission to upload files (403): The API key lacks sufficient permissions. Verify user rights on the AIGC Network Disk account.
  • File too large (413): The file size exceeds the allowed upload limit. Reduce file size or split the file.
  • Internal server error (>=500): Temporary server-side issue. Retry after some time.

To resolve errors, verify input binary data, ensure correct property values, and confirm valid API credentials.

Links and References

Discussion