ftos.files.download
IMPORTANT!
Starting with v24.3.0, this is renamed from downloadFile to ftos.files.download.
Starting with v24.3.0, this is renamed from downloadFile to ftos.files.download.
Returns the contents of a stored file encoded using the Base64 scheme.
This is a business logic method for business service components.
Syntax
Copy
function ftos.files.download(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 = ftos.files.download('Report_ddde85d9-ca38-42b8-b6b9-e5cc6bb4078c.pdf');