SunLink icon

SunLink

SunLink 博客 API 完整集成节点 (自动登录)

📎 文件管理 (File) → ⬆️ 创建上传会话 (Create Session)

AI-generated

Summary

Create an upload session for a file within the SunLink file management system, enabling subsequent chunked uploads of the specified file.

Inputs

  • 存储策略 ID (required) — The ID of the storage policy under which the file will be stored.
  • 文件路径 (URI) (required) — The target storage path for the file, e.g., /covers/my-image.png.
  • 文件大小 (Bytes) (required) — The size of the file to upload, specified in bytes.
  • 覆盖已存在 — Boolean flag indicating whether to overwrite the file if it already exists at the given path. Defaults to true.

Output shape

a single JSON object representing the created upload session details

The output includes details such as the session ID needed for subsequent chunk uploads. Errors are returned as failure responses.

Examples

Example 1: Create an upload session for a new image file

Specify the storage policy ID, set the file URI to /covers/my-image.png, provide the file size in bytes, and choose whether to overwrite existing files.

Discussion