Skip to main content
POST
/
form
/
human_input
/
files
/
upload
Error
A valid request URL is required to generate request examples
{
  "id": "1a77f0df-c0e6-461c-987c-e72526f341ee",
  "name": "draft-review.pdf",
  "size": 204800,
  "extension": "pdf",
  "mime_type": "application/pdf",
  "created_by": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
  "created_at": 1705407629,
  "preview_url": null,
  "source_url": null,
  "original_url": null,
  "user_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
  "tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
  "conversation_id": null,
  "file_key": "uploads/draft-review.pdf"
}

Documentation Index

Fetch the complete documentation index at: https://dify-6c0370d8-docs-hitl-2.mintlify.app/llms.txt

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

Authorizations

Authorization
string
header
required

用于向人工介入表单附加文件的短期上传令牌。通过 签发上传令牌 接口获取,并以 Authorization: Bearer hitl_upload_{token} 形式传入。

Body

multipart/form-data

文件上传请求,需使用 multipart/form-data。

file
file
required

要上传的文件。必须符合表单输入的 allowed_file_typesallowed_file_extensions 配置。

Response

文件上传成功。

id
string

提交人工介入表单 接口的 filefile-list 输入中,将该值作为 upload_file_id 引用。

name
string

原始文件名。

size
integer

文件大小(字节)。

extension
string | null

文件扩展名。

mime_type
string | null

文件的 MIME 类型。

created_by
string | null

文件归属的用户标识。

created_at
integer<int64> | null

文件创建时的 Unix 时间戳(秒)。

preview_url
string | null

用于预览文件的签名 URL。未生成时为 null

source_url
string | null

若文件来自远程拉取,则为原始来源 URL;本地上传时为 null

original_url
string | null
user_id
string | null

上传归属用户的标识。

tenant_id
string | null

上传归属的租户。

conversation_id
string | null

对人工介入上传始终为 null

file_key
string | null

内部存储键。