跳转到主要内容
POST
/
datasets
/
pipeline
/
file-upload
Error
A valid request URL is required to generate request examples
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "name": "report.pdf",
  "size": 524288,
  "extension": "pdf",
  "mime_type": "application/pdf",
  "created_by": "ad313dd6-ef04-4dd1-a5b0-c0f0b9e2e7e4",
  "created_at": "2025-03-06T12:00:00"
}

Documentation Index

Fetch the complete documentation index at: https://docs.dify.ai/llms.txt

Use this file to discover all available pages before exploring further.

授权

Authorization
string
header
必填

API Key 认证。对于所有 API 请求,请在 Authorization HTTP 头中包含您的 API Key,并加上 Bearer 前缀。示例:Authorization: Bearer {API_KEY}强烈建议将 API Key 存储在服务端,不要在客户端共享或存储,以避免 API Key 泄漏导致严重后果。

请求体

multipart/form-data
file
file
必填

要上传的文件。

响应

文件上传成功。

id
string

已上传文件的唯一标识符。

name
string

原始文件名。

size
integer

文件大小(字节)。

extension
string

文件扩展名。

mime_type
string | null

文件的 MIME 类型。若上传未包含 MIME 类型则可能为 null

created_by
string

上传文件的用户 ID。

created_at
string | null

上传时间戳(ISO 8601 格式)。在记录创建过程中可能为 null