Skip to main content

Download File

Download a file by its ID or return its content as a string/bytes.

Args: file_id: UUID of the file. current_user: Authenticated user. session: Database session. storage_service: File storage service. return_content: If True, return raw content (str) instead of StreamingResponse.

Returns: StreamingResponse for client downloads or str for internal use.

Path Parameters
file_id uuid REQUIRED
Query Parameters
return_content Return Content
Responses
200

Successful Response

Schema OPTIONAL
undefined
422

Validation Error

Schema OPTIONAL
detail object[] OPTIONAL
loc undefined[]
msg Message
type Error Type
Search