DownloadFile
Downloads the raw content of a user-uploaded chat file.
Stored Procedure-Specific Information
Required input: ClaudeFileId. If neither FileName nor FileStream is specified, the provider returns the raw uploaded-file bytes in Base64-encoded FileData. Set FileName to save the file locally, or supply FileStream from your application to receive the bytes through an output stream. FileName takes precedence over FileStream.
To execute this procedure, enter:
EXEC DownloadFile ClaudeFileId = 'claude_file_123';
EXEC DownloadFile ClaudeFileId = 'claude_file_123', FileName = 'C:\\Downloads\\chat-file.pdf';
Input
| Name | Type | Required | Accepts Output Streams | Description |
| ClaudeFileId | String | True | False | The chat file Id to download. Required: Obtain it from GetChatMessageFiles.Id or ChatMessages.Files (for example, claude_file_abc123). |
| FileName | String | False | False | Optional absolute local path where the downloaded file is saved. Takes precedence over FileStream. |
| FileStream | String | False | True | Optional output stream that receives the file bytes when FileName is not set. |
Result Set Columns
| Name | Type | Description |
| FileData | String | The downloaded file bytes encoded as Base64 when FileName and FileStream are not set. |
| Success | Boolean | Indicates whether the download completed successfully. |