downloadFile
Returns the contents of a stored file encoded using the Base64 scheme.
Syntax
function downloadFile(fileName: string): string
| Parameter | Description |
|---|---|
fileName
|
Unique internal ID of the file (real name). |
Return Value
Returns a string value that contains the file encoded using the Base64 scheme.
Examples
In this example, we store the Base64 encoded contents of the Report_ddde85d9-ca38-42b8-b6b9-e5cc6bb4078c.pdf file in a variable called contents.
var contents = downloadFile('Report_ddde85d9-ca38-42b8-b6b9-e5cc6bb4078c.pdf');