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 add-in 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 | Description |
| ClaudeFileId | String | True | The chat file Id to download. Required: Obtain it from GetChatMessageFiles.Id or ChatMessages.Files (for example, claude_file_abc123). |
| FileName | String | False | Optional absolute local path where the downloaded file is saved. Takes precedence over FileStream. |
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. |