Download File
Download a file from a record's Files and Images field.
Download File
Downloads a file by file handle.
download_file(handler: string): Promise<void>;
Parameter Name | Type | Description |
---|---|---|
handler | string | Handle of the file to download. |
tip
Use the handle value from the Files and Images field. Note that the value returned by Files and Images is an array.
Example Script - Download Files
<!--download_file(handler: string): Promise<void>;-->
<script>
const fileSlug = "s8f119717f"
window.SmartSuite.get_record('67647d9b7a03fad7da12d9f2', '67647dd4b4761f19a7b55692').then(
(record) => {
const fileField = record[fileSlug]
window.SmartSuite.download_file(fileField[0].handle)
}
);
</script>
Response
File will be downloaded to the user's web browser.