BaiduWp icon

BaiduWp

调用百度网盘接口

Overview

This node integrates with Baidu Netdisk (Baidu Cloud Storage) API to manage files and user information. Specifically, for the "管理文件" (Manage Files) resource and the "复制文件" (Copy File) operation, it allows users to copy files within their Baidu Netdisk storage by specifying collections of files with source paths, destination directories, and optional new names.

Common scenarios include:

  • Automating file organization by copying multiple files or folders to different directories.
  • Creating backups of important files by duplicating them in other locations.
  • Batch processing file operations where many files need to be copied programmatically.

Example: A user wants to copy a set of project documents from one folder to another while optionally renaming some files during the copy process. They can provide a collection of file paths, target destinations, and new names, and the node will perform the copy operation accordingly.

Properties

Name Meaning
操作合集 A collection of files to operate on. It supports two input modes:
- JSON 合集: A JSON array describing files with properties like path, destination, and new name.
- 文件合集: A fixed collection allowing multiple entries, each with:
- 文件路径 (path): The source file path to copy.
- 移动目录 (dest): The destination directory path where the file should be copied.
- 重命名 (newname): Optional new name for the copied file.

The property is required when performing copy or move file operations under the "manageable" resource.

Output

The output is a JSON array where each item corresponds to the result of the copy operation for each input item. The structure typically includes:

  • path: The path of the copied file in Baidu Netdisk.
  • fs_id: The unique file system ID assigned by Baidu Netdisk.
  • category: Usually indicates the type, e.g., "文件夹" (folder).

If multiple files are copied, the output contains an array of such objects representing each copied file.

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for Baidu Netdisk API access.
  • The node uses Baidu's REST API endpoints for file management.
  • Network connectivity to Baidu Netdisk services is necessary.
  • No additional external dependencies beyond those bundled with the node.

Troubleshooting

  • Invalid or missing file collection: If the "操作合集" property is empty or invalid, the node throws an error prompting to select a valid operation collection.
  • Invalid JSON format: When using the JSON collection input, if the JSON is malformed, an error indicating invalid JSON will occur.
  • API errors: The node checks for error codes returned by Baidu API and surfaces them as node execution errors. Common issues include authentication failures, insufficient permissions, or invalid paths.
  • Encoding issues: Paths and parameters are URL-encoded before sending to the API; incorrect encoding might cause failures.
  • Quota limits: Users may encounter errors if their Baidu Netdisk account exceeds storage or API rate limits.

To resolve these:

  • Ensure the file list collection is correctly formatted and complete.
  • Verify API credentials and permissions.
  • Check that all paths exist and are accessible.
  • Review Baidu Netdisk account status for quota or restrictions.

Links and References

Discussion