DownloadFile
Downloads file from the FileContent field of an attachments resource.
Procedure-Specific Information
The Oracle Fusion Cloud SCM API exposes certain attachment tables which contain the 'FileContent' and 'FileWebImage' fields. The content of these attachments can be downloaded using this stored procedure.
Required Parameters: AttachmentTableName, KeyNames and KeyValues.
You must supply the attachment table's name, it's Id columns' name and values as commma-separated strings. Please note that the order in which values are supplied should be the same as that of key names.
EXEC DownloadFile AttachmentTableSchemaName='SupplyChainPlanning', AttachmentTableName='TableName', KeyNames = 'Name1,Name2', KeyValues='1,2'; EXEC DownloadFile AttachmentTableSchemaName='SupplyChainPlanning', AttachmentTableName='TableName', KeyNames = 'Name1,Name2', KeyValues='1,2', DownloadPath='C://File.pdf';
You can also have the attachment content streamed into an output stream using the FileStream parameter.
Input
| Name | Type | Accepts Output Streams | Description |
| AttachmentTableSchemaName | String | False | The schema name of the attachment table. |
| AttachmentTableName | String | False | The attachment table's name. |
| KeyNames | String | False | List of comma-separated names of Id columns of the table name. Must be set in the same order as they appear in the table. |
| KeyValues | String | False | List of comma-separated values of Id columns of the table name. Must have the same order as KeyNames. |
| DownloadPath | String | False | Full file path of the file to download content into. For example: C:\File.pdf |
| FileStream | String | True | Instance of an output stream where file data is written to. Only used if DownloadPath is not provided. |
Result Set Columns
| Name | Type | Description |
| Success | String | Execution status of the stored procedure. |
| FileData | String | Base64 encoded content of the downloaded file. Returned only if DownloadPath and FileStream are not supplied. |