setDownload

Downloads a file from the file upload location.

The function works by setting the navigation result to the corresponding download location. After the transaction completes, the client will download the file automatically.

Syntax

Copy
function setDownload(fileRealName : string, {entityName?: string, recordId?: string}): void;
 
Parameter Type Description
fileRealName string Unique internal ID of the file (real name).
entityName (optional) string Name of the entity that stores the file's corresponding attribute in the client-side context. In conjunction with the recordId attribute, this can speed up file retrieval.
recordId (optional) string ID of the record that stores the file's corresponding attribute in the client-side context. In conjunction with the entityName attribute, this can speed up file retrieval.

Example