JDBC Driver for Salesforce Marketing Cloud

Build 25.0.9540

GetFileForAnAsset

Retrieves the binary file associated with an asset in Salesforce Marketing Cloud. This procedure enables direct access to stored files, such as images or documents, for reuse or download through integrations.

Input

Name Type Required Accepts Output Streams Description
AssetId Integer True False Specifies the unique identifier (Id) of the asset whose associated file is to be retrieved. This identifier links the stored procedure request to the correct Content Builder asset.
DownloadPath String False False Specifies the full file path where the retrieved asset file is saved. This path determines the local or network location for the downloaded file output.
FileStream String False True Specifies the instance of an output stream to which the file data is written. This parameter is used only when a DownloadPath value is not provided, allowing the file to be processed programmatically instead of saved directly to disk.

Result Set Columns

Name Type Description
Success Boolean A Boolean field that returns a value of 'true' when the asset file is successfully retrieved and stored. It returns a value of 'false' when the operation fails due to invalid identifiers, connection errors, or file access issues.
Content String Returns a Base64-encoded string that represents the binary content of the retrieved file. This value can be decoded to reconstruct the original asset file for use in other applications or systems.

Copyright (c) 2026 CData Software, Inc. - All rights reserved.
Build 25.0.9540