AIGC网盘 - 通过URL上传

从外部URL下载文件并上传到AIGC网盘,支持多种协议和文件类型

Overview

This node downloads a file from a specified external URL (supporting HTTP and HTTPS protocols) and uploads it to the AIGC Network Disk service. It supports multiple file categories and allows users to customize the filename, add descriptions, and tag files for easier management. This node is useful in scenarios where you want to automate backing up or archiving remote files directly into your cloud storage without manual downloading and uploading steps.

Practical examples:

  • Automatically saving images from URLs shared in chat messages to your network disk.
  • Archiving documents linked on websites by providing their URLs.
  • Downloading video or audio files from public URLs and storing them with metadata for later use.

Properties

Name Meaning
文件URL The URL of the file to download; must be an HTTP or HTTPS address.
自定义文件名 Custom filename including extension; if empty, the filename will be inferred from the URL.
文件描述 Description of the file, used to record its source or purpose.
文件分类 File category for easier management and filtering. Options: 图片 (Image), 文档 (Document), 视频 (Video), 音频 (Audio), 压缩包 (Archive), 其他 (Other). Default is Other.
文件标签 Comma-separated tags for categorizing the file, e.g., "远程,下载,备份" (remote, download, backup).

Output

The node outputs JSON data for each processed item with the following structure:

  • success: Boolean indicating if the upload succeeded.
  • data: The response data returned from the AIGC Network Disk API after uploading.
  • operation: The string "uploadFromUrl" indicating the performed operation.
  • sourceUrl: The original URL of the downloaded file.
  • filename: The final filename used for the uploaded file (custom or inferred).
  • message: A success message confirming the file was uploaded successfully.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the AIGC Network Disk service.
  • The node uses an HTTP POST request to the /api/files/upload-from-url endpoint of the AIGC Network Disk API.
  • Timeout for the HTTP request is set to 5 minutes (300,000 ms).

Troubleshooting

  • Empty or invalid URL: If the URL property is empty or does not start with http:// or https://, the node throws an error indicating the URL cannot be empty or is invalid.
  • HTTP errors from API:
    • 400 Bad Request: Indicates an invalid URL or wrong request parameters.
    • 401 Unauthorized: The API token is invalid or expired; reconfigure the API credentials.
    • 404 Not Found: The file at the given URL does not exist.
    • 5xx Server Errors: Internal server errors; retry after some time.
  • Timeouts: Large files or slow networks might cause timeouts; consider increasing timeout settings if supported.
  • Continue on Fail: If enabled, the node continues processing other items even if one fails, returning error details per failed item.

Links and References

Discussion