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

Short-lived upload token for attaching files to a Human Input form. Obtain via Issue Upload Token and pass as Authorization: Bearer hitl_upload_{token}.

Body

multipart/form-data

File upload request. Requires multipart/form-data.

file
file
required

The file to upload. Must conform to the form input's allowed_file_types and allowed_file_extensions.

Response

File uploaded successfully.

id
string

Reference this value as upload_file_id in file and file-list inputs on Submit Human Input Form.

name
string

Original file name.

size
integer

File size in bytes.

extension
string | null

File extension.

mime_type
string | null

MIME type of the file.

created_by
string | null

Identifier of the user the file was uploaded for.

created_at
integer<int64> | null

Unix timestamp (seconds) when the file was created.

preview_url
string | null

Signed URL for previewing the file. null if not generated.

source_url
string | null

Original source URL, if the file was fetched remotely. null for local uploads.

original_url
string | null
user_id
string | null

Identifier of the user that owns the upload.

tenant_id
string | null

Tenant the upload belongs to.

conversation_id
string | null

Always null for HITL uploads.

file_key
string | null

Internal storage key.